Click here to Skip to main content
15,914,071 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one asp.net page.In which two radiobuttons are there one for loginbyemailid and other for loginbyusername.i have two diffrent login page or a login code.I have to display the login page according to radiobutton checked value below the two radio button.
please help...
thanx in advance..
Posted
Updated 11-Sep-12 7:30am
v2
Comments
RaisKazi 11-Sep-12 17:20pm    
Have added same solution multiple times by mistake. Tried to delete extra solutions but its too slow at my end. Can please someone delete my extra solutions. Cheers :)

You can use Iframe tag in HTML5
fallow this link
http://www.w3schools.com/html5/tag_iframe.asp[^]

http://www.roseindia.net/tutorial/html/html5/HTML5iFrameTag.html[^]


Hope it may help you...
 
Share this answer
 
Well, this does not sounds effective design idea. Why you need separate pages for user login by Email or UserName?

Just change Text of your label infront of textbox based on radio button selection. Then on your login button validate user based on radio button selection(Email/UserName).

If you have extra validations for Email then you may take two different TextBoxes. One for Email and other for UserName and then make them visible based on radio button selection.

This seems to be simple functionality and you really need not to have multiple pages for this.
 
Share this answer
 
ASP.NET
<body>
    <form id="form1"  runat="server">
    <div>
   
<iframe style="width: 100%; height: 200px;" src="Default2.aspx"></iframe>
<iframe style="width: 100%; height: 200px;" src="Default.aspx"></iframe>
<iframe style="width: 100%; height: 200px;" src="http://www.codingforums.com"></iframe>
<iframe style="width: 100%; height: 200px;" src="http://www.disney.com"></iframe>

    
    </div>
    </form>
</body>

This the example.
 
Share this answer
 
v2
Dear Friend,

frist u take radiobuttonlist from toolbox and add to ur design page

XML
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True"
            RepeatDirection="Horizontal">
            <asp:ListItem>Email</asp:ListItem>
            <asp:ListItem>Username</asp:ListItem>

    </asp:RadioButtonList>


and in aspx.cs page write the code

C#
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
   {
       if (RadioButtonList1.SelectedItem.Text == "Email")
       {
            Response.redirect("Email.aspx")
       }
       else if (RadioButtonList1.SelectedItem.Text == "Username")
       {
             response.redirect("Username.aspx");
       }
   }


Regards,

AnilKumar.D
 
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