Click here to Skip to main content
15,922,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a MVC, ASP.Net application and I want to create a dialog form.I created a view(*.ascx).I am openning this from controller with return View("Questionnaire", list);

The code for my control is this :
XML
<%@ Control Language="C#"  Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Questionnaire>>" %>

<div id="dialog">

<table>
 <tr><td >Question</td><td colspan="2">Yes/No</td></tr>
   <%  foreach (Questionnaire s in Model)
       {
    %>
     <tr>
<td><%=s.Question%></td>
<td><input name="Input<%=s.Id %>"  style="text-align:center;" type="radio" /></td>
<td><input name="Input<%=s.Id %>"  style="text-align:center;" type="radio" /></td>
</tr>
 <%
   }
 %>
</table>

 </div>

  <script type="text/javascript">

    $(document).ready(function () {
    });

    $(function () {
     $("#dialog").dialog();
     });
   </script>

But my view doesn't look like a dialog box .Can somebody tell me what's wrong?
Posted

1 solution

Hi,

I think you have error in jquery code... Check my (your) example here[^]. Its all working...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900