You must Sign In to post a response.
  • Category: ASP.NET

    Help with dividing this in two panels or tables plz

    Hello

    I have a project using asp.net and vb.net

    I have a table and I want to divide it in two panels without disturbing the table layout

    in one panel I have 4 radiobuttons if both are yes then I have to enable panel2, on page load panel 2 has to be disabled.

    the code is shown below, please help me adjust panels in this tables

    I want this in panel1

    <div class="main"> <table> <tbody class='details'> <tr class='welcome'><td colspan='4'><p></p><p>When all details are completed you will be asked to submit them.</p><p>please confirm whether you are the right person for us ?</p></td></tr>

    <tr class='welcome'><td class='centre'><span>My Name is:</span><br /><strong>Jones</strong></td><td><span>Correct?</span> <a class="tooltip"><img src="info.png" /><span><strong>Your Name</strong><br />Sorry if it's not exactly correct.</span></a><br /> <asp:RadioButton ID="RadioButton1" runat="server" Text="Yes" TextAlign="Left" GroupName="namegroup" AutoPostBack="True" /><asp:RadioButton ID="RadioButton2" runat="server" Text="No" TextAlign="Left" GroupName="namegroup" onchange="confirmExit();" AutoPostBack="true" /></td><td class='centre'><span>The Location </span><br /><strong>Main Road, Africa</strong></td><td><span>Correct?</span> <a class="tooltip"><img src="info.png" /><span><strong>Address</strong><br />Click 'Yes' if this identifies your location. It can be corrected to an exact address, if necessary, in the details below.</span></a> <br /> <asp:RadioButton ID="RadioButton3" runat="server" Text="Yes" TextAlign="Left" GroupName="locationname" AutoPostBack="True" /><asp:RadioButton ID="RadioButton4" runat="server" Text="No" TextAlign="Left" GroupName="locationname" AutoPostBack="true" onchange="confirmExit();" /></td></tr> <tr><td colspan='4' class='hrr'></td></tr>

    I WANT TO PUT THE BELOW IN PANEL 2

    <tr><td colspan='4' class='centre'><p>If you have answered 'Yes' to both questions above, please proceed (or continue) to provide the details below.</p></td></tr> <tr><td> Name:</td><td> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </td><td>Address:</td><td> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td></tr> <tr><td> Room Name:</td><td> <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox></td><td>Date of Survey:</td><td> <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox></td></tr> <tr><td>Contact Number:</td><td> <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox></td><td>Alternative Contact:</td><td> <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox></td></tr> <tr><td colspan='4' class='hrr'></td></tr>

    someone please help me code this, I knwo we can do this by diviiding this in 2tables but I an unable to do it as i am a beginner, can someone plz edit the code and show me how to divide this in 2 tables without disturbing the layout.
  • #765454
    Hi Lexi,

    It's too difficult to give exact output what you are expecting, we will provide you the sample based on that you should construct your code.

    Ex:

    Protected void Page_Load(object sender, EventArgs e)
    {
    if(!IsPostBack)
    {
    // this will load at first hit of the page..
    }

    //if you want to check the condition and hide the panel based on that condition everytime then wrote the code part in outside of the IsPostBack.

    if(your condition)
    {
    Panel1.Enabled=true;
    Panel2.Enabled=false;
    }

    }


    I hope you got my point....

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #765459
    Well actually i just need help with HTML code,
    I want someone to divide my HTML code in 2 tables without changing the layout. pleaseeeeee

  • #765461
    Hello Naveen,
    can you please divide the above HTML in 2 tables without changing its layout please,
    I tried doing it but the layout changes what do i do

  • #765462
    Hi Lexi,

    If you struck in code level we can give some examples, but in design level it's some what difficult to give examples, especially in your case, how can we know whether it's changing the layout or not, once we use your code in application and redesign then only we come to know, that is also 20% chance only, because the layout may vary based on master pages which is used in your project application and it may effect from other application pages. I request you to kindly contact your superior and explain your problem he might be helpful to you, or else if any web designer in your project kindly contact him/her, they will guide you to resolve this,

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


Sign In to post your comments