Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ui differ from depends on the client but source code is same differ in design page
depends on the webconfig key in a single form.

What I have tried:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” >

<HTML>

<HEAD>

<title>WebForm1</title>

<script runat="server" language=”C#”>

private void Page_Load(object sender, System.EventArgs e)

{

Form1.Visible = !Form1.Visible;

Form2.Visible = !Form2.Visible;

}

</script>

</HEAD>

<body MS_POSITIONING=”GridLayout”>

<form id=”Form1″ method=”post” runat=”server” >

<asp:TextBox id=”Textbox2″ runat=”server”>Form1

<asp:Button Runat=server ID=”Button1″ NAME=”Button1″ Text=”Click to see Form2″/>

</form>

<form id=”Form2″ method=”post” runat=”server” visible=”false”>

<asp:TextBox id=”TextBox1″ runat=”server”>Form2

<asp:Button Runat=server ID=”Button2″ NAME=”Button2″ Text=”Click to see Form1″/>

</form>

</body>

</HTML>
Posted
Updated 2-Jul-16 16:52pm
Comments
OriginalGriff 2-Jul-16 6:11am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
jgakenhe 2-Jul-16 22:59pm    
You might run into problems with having 2 Form tags on the page, your best bet would be to follow the solution below by showing and hiding controls with div tags within 1 form tag. Secondly, MS_POSITIONING=”GridLayout” did not work well in 2003 and will give you fits if you try and use it with modern browsers.

1 solution

Of course you can make a different UI depending on a setting. If the changes are very small then just use an if statement and hide or show individual controls. If the UI is greatly different but you still want the same page then I suggest making different divs and putting everything into each one.

Set runat="server" on your div so that you can reference it in C# and then just hide and show the appropriate divs based on your setting.
 
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