I have the MVC Telerik grid with one column as a hyper link. Whenever the user clicks on this link, I am loading a partial view using Ajax.
Within this partial view I have a Telerik MVC tabstrip control. The problem which I am currently facing is that I am not able to switch between the tabs of this tabstrip when it is rendered. Probably it is not able to reference its JavaScript files as it is loaded via Ajax.
I have already referred to the Telerik article of registering JavaScript files using the script registar:
<%= Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group
.Add("telerik.common.js")
.Add("telerik.component.js")
%>
However, the difference in this example is that here the tabstrip control is not loaded using Ajax. Only the content is loaded using Ajax whereas in my case I am loading the tabstrip control using Ajax.
How can I fix this problem?
I resolved it! If you face such an issue, refer to Telerik Extensions for ASP.NET MVC Manual.
Related
We are using SAP UI5 in SAP MII and if we use MVC it is not getting displayed in Portal, as portal in IE 9 makes rendering mode to Quirks whereas UI5 on MVC requires Standard mode in IE 9 to display the web page. We have also found that if we don't use MVC then UI5 web pages from portal are being displayed in Quirks mode itself. But the only problem we are facing on how to define the event handlers of UI5 standard events such as onAfterRendering. As there is no controller, the framework is not able to recognize the event handler when we define it in the usual way.
Any pointer on how to define standard event handler for UI5 in JS file shall be highly appreciated.
Thanks,
Dipankar
Not sure why not using MVC and in particular a controller would enable the controls to work in quirks mode. I wouldn't expect the controls to render correctly etc, and not using the MVC pattern doesn't sound like a maintainable workaround.
There are a few blogs and SAP notes related to the quirks mode on the SCN, I've enclosed a few below.
SAPUI5 on Portal
Does SAPUI5 actually work in the SAP Portal?
Regards,
Jason
Instead of trying to run UI5 in Quirks Mode, why not run Web Dynpro applications in Standart Mode by implementing OSS Note 1911889 ? Then, you can put your UI5 and Web Dynpro content in Unified Framework Page on EP.
I am developing a Spring MVC application and i am looking for a Lightbox plugin that supports forms, meaning i can call my form in it and it will be displayed just like a picture does. Has anyone ever done this before please advise.
I would also like to know if there is any specific call to the light box when using an MVC design pattern or will a simple call to the forms url will work.
Is it possible to use Mvc3 razor scripts inside mvc 2 aspx page view and mvc 2 ascx control view?
I'm not sure what you are asking. What do you mean by "razor scripts"? Do you mean a razor partial? In that case, then yes. An aspx view can call a razor partial just fine (and vice versa).
If you mean embed a chunk of razor inside of an aspx/ascx, then no.
Razor is intended for MVC 3, but people have successfully gotten it working in MVC 2. Such as this question: How to Download Razor View Engine
In short No. You can use Razor and the WebForms view engines alongside each other, but you cannot mix them in the same view.
Besides, as far as I know, you can't use Razor with ASP.NET MVC 2 either although I'm not 100% sure on that last one.
We have to migrate our asp.net mvc views, that use webforms view engine, into razor view engine.
The situation is that we have a group of web designers that uses dreamweaver to change the html of these files.
Do you know if there is something in dreamweaver to view correctly the razor code (i mean, hightlighted to easily read for them)?
Support for ASP.NET was dropped in Dreamweaver CS4 (current version is CS5), so any support would come only through a third-party plugin.
I followed Peters steps for adding cshtml to the list of editable files:
http://blog.metameister.com/blog/2011/04/08/open-new-file-types-and-add-syntax-highlighting-in-dreamweaver-cs5-on-windows-7/
Since Dreamweaver does not recognize Razor elements, this allows to edit the csHTML inside Dreamweaver, while in the design view you see the Razor parts is if they were text.
If your designers expect a design view, they might not be happy, if they are coder-designer how tweak raw (cs)html, then that might help them.
For me that is helpful, although I like the Visual Studio text editor a lot, writing text inside the page is sometimes easier with DW, for instance making some text goes by ctrl-b inside DW while I could not figure out a way to do this in VS by shortcut.
Razor is still in beta so I would be surprised if there are any plugins available yet.
I am developing an application using ASP.Net MVC and jQuery. Depending on users action, I load partial views into the page using jQuery's $.ajax method.
The problem, I am experiencing, is related to a particular partial view that contains a form, in which the client side validation is enabled. It does seem like the JavaScript code generated in this partial view is not being executed, hence the client validation is not working.
Does anybody have a solution for this issue?
Thanks!
Zen
You might need to put all scripts contained in this partial into a separate function. Then in the success callback of you AJAX request simply call this function: it should attach validation to the newly modified DOM.