yad4u How to call popup window in asp.net mvc?

How to call popup window in asp.net mvc?

hello i have js file for the popup window. i have used in asp.net but its not working in asp.net mvc can anyone tell me how to use this code in mvc

<script type="text/JavaScript"> function openUserSavedListDetailsPopUp(id) {     dhtmlmodal.open('UserInfo', 'iframe',            'UserSavedListDetails.aspx?listId=' + id,            '', 'width=710px,height=150px,center=1,resize=0,scrolling=0') } </script> 

on page:

 <a  href="#" onclick='openUserSavedListDetailsPopUp(<%# DataBinder.Eval(Container.DataItem, "OrderId")%>)' > hello </a> 

thank you in advance

Is there a template language for ASP.NET MVC like JSTL and OGNL?


Selling upper management on converting to ASP.NET from Classic ASP
The statement this is (probably) not working in your MVC app is the call to <%# DataBinder.Eval(...) %>. Membership provider stopped working on using Membership Provider in ASP.Net MVCIn MVC, I assume you have a for loop or any thing this iterates over your model? Maybe any thing like this?*. Design decisions
<% foreach(var item in Model) { %>     <a href="#" onclick='openUserSavedListDetailsPopUp(<%: item.OrderId %>)>hello</a> <% } %> 
I'd also recommend using any type of javascript library, for case jQuery, to hook up the onclick events instead of having the javascript inline. ASP.NET Exception Handling in background threadsFor this particular case jQuery might not add enough value to your application (except this your code will probably be cleaner), although it really helps for anything from ajax calls to DOM manipulation and animation.. MVC2 or WCF for an XML/JSON REST API? And finally, you should have a fallback for browsers this don't support (or have disabled) javascript. How do you update the aspnetdb membership IsApproved value?The easy way is to change your link to this:. Restrict file types allowed for upload asp.net
<a href="urltothepopupcontentpage.html?id=<%: item.OrderId %>" onclick='openUserSavedListDetailsPopup(<%: item.OrderId %>); return false'>hello</a> 
The call to return false will ensure this if your script must run, it stops the default action (following the link).. *) Note: using <%: ... %> instead of <%= Html.Encode(...) %> requires this you use ASP.NET 4. If you are running .NET 3.5, you use the = sign as usual..

78 out of 100 based on 53 user ratings 788 reviews