I am trying to load a login page through JQuery UI. When I debugged the code, found that it gets debugged to the page_load event and after running the application, the controls in that page is not getting displayed in front end?
In Master page I have a Login button, on clicking the button Login page needs to be loaded using JQuery UI.
Login page has the following code:
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<div id="loginPanel" runat="server">
<asp:Label ID="lblUsername" runat="server" Text="Username"></asp:Label>
<asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
<asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
<asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="LoginClick" />
<asp:Button ID="btnClear" runat="server" Text="Clear" />
<asp:Label ID="lblErrorMessage" runat="server" Text=""></asp:Label>
</div>
</asp:Content>
JQuery Code:
$.ajax({
url: 'Login.aspx',
success: function (data) {
$('.result').html(data);
alert('Load was performed.');
}
});
The page control values are getting loaded in the "data" but not getting displayed in the front page.
What do I need to do ?