I am using UpdatePanel control in the middle of the page for partial postback of Address Type radio button change. Everything works fine but I am struggling with alignment issue. The controls inside the UpdatePanel do not align with outside controls. How could I solve this issue? Please let me know.
<table id="tblEdit" class="cssclass1" cellpadding="3" runat="server">
<tr>
<td class="cssclass1" align="right">
Title
</td>
<td>
<telerik:RadTextBox ID="textbox1" runat="server" Width="280px" ReadOnly="true"
BackColor="LightGray" />
</td>
<td align="right">
<asp:Label CssClass="cssclass1" ID="LblFirstName" runat="server">First Name</asp:Label>
</td>
<td align="left">
<telerik:RadTextBox ID="txtFirstName" runat="server" MaxLength="30">
</telerik:RadTextBox>
<asp:Image ID="Image1" ImageUrl="../../../images/requiredfield.gif" AlternateText="Required Field"
runat="server"></asp:Image><asp:HiddenField ID="hfCaseEntityId" runat="server" />
</td>
</tr>
<tr>
<td colspan="4">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<tr>
<td class="cssclass1" align="right">
Address Type
</td>
<td align="left">
<asp:RadioButtonList ID="AddressType" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="AddressType_SelectedIndexChanged" AutoPostBack="true" >
<asp:ListItem Value="1" Selected="True">Home</asp:ListItem>
<asp:ListItem Value="2">Work</asp:ListItem>
</asp:RadioButtonList>
</td>
<td class="cssclass1" align="right">
</td>
<td align="left">
</td>
</tr>
<tr>
<td align="right">
<asp:Label CssClass="cssclass1" ID="LblHomeStreet1" runat="server">Address</asp:Label>
</td>
<td align="left">
<telerik:RadTextBox ID="txtHomeStreet1" runat="server" MaxLength="40" >
</telerik:RadTextBox>
<asp:Image ID="Image10" ImageUrl="../../../images/requiredfield.gif" AlternateText="Required Field"
runat="server"></asp:Image>
</td>
<td align="right">
<asp:Label CssClass="cssclass1" ID="LblHomeStreet2" runat="server">Street 2</asp:Label>
</td>
<td align="left">
<telerik:RadTextBox ID="txtHomeStreet2" runat="server" MaxLength="40" Width="280px">
</telerik:RadTextBox>
</td>
</tr>
<tr>
<td align="right">
<asp:Label CssClass="cssclass1" ID="LblHomeCity" runat="server">City</asp:Label>
</td>
<td align="left">
<telerik:RadTextBox ID="txtHomeCity" runat="server" MaxLength="30">
</telerik:RadTextBox>
</td>
<td align="right">
<asp:Label CssClass="cssclass1" ID="LblHomeState" runat="server">State</asp:Label>
</td>
<td align="left">
<telerik:RadTextBox ID="txtHomeState" runat="server" MaxLength="30">
</telerik:RadTextBox>
</td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
Your HTML is invalid. The first line in your <ContentTemplate> is a <tr>, however, it looks like you are trying to include another <table> there. You might want to look into cellpading=0 and cellspacing=0 on your inner table. Also, you could add a CSSClass to your UpdatePanel to do any additional formatting.
Related
I have two UpdatePanels. every UpdatePanel has ASP.NET Controls with HTML5 attributes like required. When i click the submit button on UpdatePanel1, It also validates the controls in UpdatePanel2 and does not move ahead till i do not handle the required ASP.NET controls in UpdatePanel.
Could someone please help me on this.
Below is the code i have done.
<div class="tab_container">
<div id="tab1" class="tab_content">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="tbl">
<tr>
<td>Id:</td>
<td><asp:TextBox ID="txtId" runat="server"></asp:TextBox></td>
<td>PIN:</td>
<td><asp:TextBox ID="txtPIN" runat="server" autofocus required></asp:TextBox></td>
<td rowspan="2" colspan="2">
<div>
<asp:Image ID="img" CssClass="employeepic" runat="server" />
<asp:FileUpload ID="fu" runat="server" Style="position: absolute; top: 65px; right: 50px; width: 80px;" required />
</div>
</td>
</tr>
<tr>
<td>Tazkira / Passport: No</td>
<td><asp:TextBox ID="txtTazPas" runat="server" required></asp:TextBox></td>
<td>TIN:</td>
<td><asp:TextBox ID="txtTIN" runat="server" required></asp:TextBox></td>
</tr>
<tr>
<td>Last Name:</td>
<td><asp:TextBox ID="txtLastName" runat="server"></asp:TextBox></td>
<td>First Name:</td>
<td><asp:TextBox ID="txtFirstName" runat="server" required></asp:TextBox></td>
<td>Father Name:</td>
<td><asp:TextBox ID="txtFatherName" runat="server" required></asp:TextBox></td>
</tr>
<tr>
<td>Gender:</td>
<td>
<asp:DropDownList ID="ddlGender" runat="server">
<asp:ListItem Value="Male">Male</asp:ListItem>
<asp:ListItem Value="Female">Female</asp:ListItem>
</asp:DropDownList>
</td>
<td>Nationality:</td>
<td>
<asp:DropDownList ID="ddlNationality" runat="server" DataSourceID="CountriesEntityDataSource" DataTextField="Nationality" DataValueField="Nationality">
</asp:DropDownList>
<asp:EntityDataSource ID="CountriesEntityDataSource" runat="server" ConnectionString="name=ChemonicsDBEntities" DefaultContainerName="ChemonicsDBEntities" EnableFlattening="False" EntitySetName="Countries" Select="it.[Id], it.[Country1], it.[Nationality]" OrderBy="it.[Id] asc" Where="it.[DeletedBy] = 0">
</asp:EntityDataSource>
</td>
<td>Date of Birth:</td>
<td><asp:TextBox ID="txtDOB" runat="server" data-date-format="mm.dd.yyyy" datepicker data-week-start="6" required></asp:TextBox></td>
</tr>
<tr>
<td>Present Address:</td>
<td colspan="5"><asp:TextBox ID="txtPreDetailedAddress" Width="97.4%" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>District:</td>
<td><asp:TextBox ID="txtPreDistrict" runat="server"></asp:TextBox></td>
<td>Province:</td>
<td><asp:TextBox ID="txtPreProvince" runat="server"></asp:TextBox></td>
<td>Country:</td>
<td>
<asp:DropDownList ID="ddlPreCountry" runat="server" DataSourceID="CountriesEntityDataSource" DataTextField="Country1" DataValueField="Country1">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>Permanent Address:</td>
<td colspan="5"><asp:TextBox ID="txtPerDetailedAddress" Width="97.4%" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>District:</td>
<td><asp:TextBox ID="txtPerDistrict" runat="server"></asp:TextBox></td>
<td>Province:</td>
<td><asp:TextBox ID="txtPerProvince" runat="server"></asp:TextBox></td>
<td>Country:</td>
<td>
<asp:DropDownList ID="ddlPerCountry" runat="server" DataSourceID="CountriesEntityDataSource" DataTextField="Country1" DataValueField="Country1">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>Official Email:</td>
<td><asp:TextBox ID="txtOfficialEmail" runat="server" TextMode="Email"></asp:TextBox></td>
<td>Personal Email:</td>
<td><asp:TextBox ID="txtPersonalEmail" runat="server" TextMode="Email"></asp:TextBox></td>
</tr>
<tr>
<td>Official Phone:</td>
<td><asp:TextBox ID="txtOfficialPhone" runat="server" TextMode="Number"></asp:TextBox></td>
<td>Personal Phone:</td>
<td><asp:TextBox ID="txtPersonalPhone" runat="server" TextMode="Number" required></asp:TextBox></td>
<td>Skype Id:</td>
<td><asp:TextBox ID="txtSkypeId" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2">Has USA Visa<asp:CheckBox ID="chkUSAVisa" runat="server" /></td>
<td colspan="2">Life insurance send to head office<asp:CheckBox ID="chkLifeInsurance" runat="server" /></td>
<td colspan="2">Can take report from all projects<asp:CheckBox ID="chkReportingFromAll" runat="server" /></td>
</tr>
<tr>
<td></td>
<td colspan="5"><asp:Button ID="btnSave" runat="server" Text="Save" CssClass="buttonleft" OnClick="btnSave_Click"></asp:Button><asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="buttonright" OnClick="btnCancel_Click"></asp:Button></td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnSave" />
</Triggers>
</asp:UpdatePanel>
</div>
<div id="tab2" class="tab_content">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="tbl">
<tr>
<td>Id:</td>
<td><asp:TextBox ID="txtOfficialId" runat="server"></asp:TextBox></td>
<td>Position:</td>
<td>
<asp:DropDownList ID="ddlOfficialPosition" runat="server" DataSourceID="PositionsEntityDataSource" DataTextField="PositionType" DataValueField="PositionType"></asp:DropDownList>
<asp:EntityDataSource ID="PositionsEntityDataSource" runat="server" ConnectionString="name=ChemonicsDBEntities" DefaultContainerName="ChemonicsDBEntities" EnableFlattening="False" EntitySetName="Positions" Select="it.[PositionType]" Where="it.[DeletedBy] = 0">
</asp:EntityDataSource>
</td>
<td>Position Details:</td>
<td><asp:TextBox ID="txtOfficialPositionDetails" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Project:</td>
<td>
<asp:DropDownList ID="ddlOfficialProject" AutoPostBack="true" runat="server" DataSourceID="ProjectsEntityDataSource" DataTextField="Name" DataValueField="Id" OnSelectedIndexChanged="ddlOfficialProject_SelectedIndexChanged"></asp:DropDownList>
<asp:EntityDataSource ID="ProjectsEntityDataSource" runat="server" ConnectionString="name=ChemonicsDBEntities" DefaultContainerName="ChemonicsDBEntities" EnableFlattening="False" EntitySetName="Projects" Select="it.[Id], it.[Name]" Where="it.[DeletedBy] = 0">
</asp:EntityDataSource>
</td>
<td>Department:</td>
<td>
<asp:DropDownList ID="ddlOfficialDepartment" runat="server"></asp:DropDownList>
<asp:EntityDataSource ID="DepartmentsEntityDataSource" runat="server" ConnectionString="name=ChemonicsDBEntities" DefaultContainerName="ChemonicsDBEntities" EnableFlattening="False" EntitySetName="Departments" Select="it.[Id], it.[Name], it.[ProjectId]" Where="it.[DeletedBy] = 0 and it.[ProjectId] = #ProId" EntityTypeFilter="">
</asp:EntityDataSource>
</td>
<td>Duty Station:</td>
<td>
<asp:TextBox ID="txtOfficialDutyStation" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>Contract Type:</td>
<td>
<asp:DropDownList ID="ddlOfficialContractType" runat="server">
</asp:DropDownList>
</td>
<td>Employment Type:</td>
<td>
<asp:DropDownList ID="ddlOfficialEmploymentType" runat="server">
</asp:DropDownList>
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Grade:</td>
<td>
<asp:DropDownList ID="ddlOfficialGrade" runat="server">
</asp:DropDownList>
</td>
<td>Step:</td>
<td>
<asp:DropDownList ID="ddlOfficialStep" runat="server">
</asp:DropDownList>
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Start Date:</td>
<td><asp:TextBox ID="txtOfficialStartDate" runat="server" data-date-format="mm.dd.yyyy" datepicker data-week-start="6" required></asp:TextBox></td>
<td>End Date:</td>
<td><asp:TextBox ID="txtOfficialEndDate" runat="server" data-date-format="mm.dd.yyyy" datepicker data-week-start="6" required></asp:TextBox></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Active:</td>
<td></td>
<td>Seperation Type:</td>
<td></td>
<td>Seperation Date:</td>
<td><asp:TextBox ID="txtOfficialSeperationDate" runat="server" data-date-format="mm.dd.yyyy" datepicker data-week-start="6"></asp:TextBox></td>
</tr>
<tr>
<td>Notes:</td>
<td colspan="5"><asp:TextBox ID="txtOfficialNotes" runat="server" TextMode="MultiLine"></asp:TextBox></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
I am unable to see the radio button list yes or NO in my screen I am getting the values from XML file.
Following code in aspx page:
<asp:Panel ID="pnlAction" runat="server" Width="100%" Visible="false">
<table cellpadding="0" cellspacing="0" border="0" width="99%">
<tr style="height: 20px;">
<td style="width: 25px;">
<hr />
</td>
<td class="secHeading frmlblBold"" style="width: 80px;" align="center">
Action
</td>
<td>
<hr />
</td>
</tr>
</table>
<table style="font-weight:normal" width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td style="width:250px;"></td>
<td style="width:350px;"></td>
<td style="width:250px;"></td>
<td style="width:350px;"></td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Action </td>
<td><asp:DropDownList ID="ddlAction" runat="server" CssClass="DropDown" DataSourceID="dsAction" DataValueField="CODE" DataTextField="CDDesc" AutoPostBack = "False" Width="342px"></asp:DropDownList></td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Service Agreement Clause </td>
<td style="vertical-align:top" style="width: 350px;">
<%-- <fieldset id="fldSLA" runat="server" style="width: 280px;">--%>
<asp:RadioButtonList ID="radSLA" runat="server" RepeatDirection="Horizontal" DataValueField="SLAID" DataTextField="SLADESC" DataSourceID="dsSLA" visible = "true">
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="rfvSLA" runat="server" ControlToValidate="radSLA" ErrorMessage="Please select if service agreement is applicable or not."
Enabled="true" Display="none"></asp:RequiredFieldValidator>
<%-- </fieldset>--%>
</td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Comments </td>
<td style="vertical-align:top">
<asp:TextBox runat="server" ID="txtActionComments" MaxLength="500" TextMode="MultiLine" width="95%" Rows="5" /> </td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" CssClass="btnOther" />
</tr>
</asp:Panel>
<asp:XmlDataSource ID="dsSLA" runat="server" EnableCaching="false" DataFile="~/XML/VisaTracking.xml"
XPath="BVILetter/SLA/ITEM" />
Code in .cs file:
if (!IsPostBack)
{
base.PageLoad();
GetReqPndActTknByMe(base.LogShortID);
radSLA.DataBind();
radSLA.SelectedValue = "Yes";
BindDataToDropdownListAction();
}
I am able to see the row count of radSLA.DataBind(); as '2'
My XML code:
<BVILetter>
<SLA>
<ITEM SLAID ="Yes" SLADESC ="Yes" />
<ITEM SLAID ="No" SLADESC ="No" />
</SLA>
</BVILetter>
But I am not able to see the radio buttons in my screen:
Please help me.
Please Check the Binding function clearly. If binding not happened properly then RadioBottonList does not appear.RadioBottonList apear only when when listItem bind properly
I have inherited some code using an ASP modal popup extender and for some reason it has now decided to stop working. Am I missing anything here? I'm not too fluent with AJAX / ASP.Net right now so im struggling to diagnose what is going wrong here.
So firstly the javascript method that displays the modal
function ShowModalRemoveEvent(ID, EventID, InstructorID, InstructorName)
{
alert("Hi");
var modal = $find('ModalPopupExtender1');
modal.show();
document.getElementById("txtID").value = ID;
document.getElementById("txtEventID").value = EventID;
document.getElementById("txtInstructorID").value = InstructorID;
document.getElementById("txtInstructorName").value = InstructorName;
}
I know this is being called because of the alert. So I would assume the prpblem is either in finding the ModalPopupExtender1 or the modal.show() line.
Here is the code for my modal popup extender
<asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="Panel4" runat="server" Style="display: none" CssClass="ModalBackground">
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="7%" class="cellAlertHeader">
<img src="../../../images/Ops/window_delete.png" style="width: 18px; height: 18px" alt=""/>
</td>
<td width="93%" class="cellAlertHeader">
<b>Cancel Instructor Event</b>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td width="5%">
<td width="95%">
<asp:TextBox ID="txtID" Style="display: none" runat="server" CssClass="TextboxTitle"></asp:TextBox>
<asp:TextBox ID="txtEventID" Style="display: none" runat="server" CssClass="TextboxTitle"></asp:TextBox>
</td>
</tr>
<tr>
<td width="5%">
</td>
<td width="95%">
<asp:TextBox ID="txtInstructorID" Style="display: none" runat="server" BorderStyle="None"
CssClass="TextboxTitle"></asp:TextBox>
<asp:TextBox ID="txtInstructorName" Style="font-size: 12px" runat="server" BorderStyle="None"
CssClass="TextboxTitle" BorderWidth="0"></asp:TextBox>
</td>
</tr>
<tr>
<td width="5%">
</td>
<td width="95%">
</td>
</tr>
<tr>
<td width="5%">
</td>
<td width="95%">
<asp:Label ID="Label2" runat="server" Text="Are you sure you want to remove this Event?"
CssClass="TextboxTitle"></asp:Label>
</td>
</tr>
<tr>
<td width="5%">
</td>
<td width="95%">
</td>
</tr>
<tr>
<td width="5%">
</td>
<td width="95%">
<asp:Button ID="ButtonConfirmRemove" runat="server" Text="Confirm" CssClass="buttonshort" />
<asp:Button ID="ButtonCancel" runat="server" Text="Cancel" CssClass="buttonshort" />
</td>
</tr>
<tr>
<td width="5%">
</td>
<td width="95%">
</td>
</tr>
</table>
</asp:Panel>
<asp:Button runat="server" ID="dummyButton" Style="display: none" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1"
runat="server"
PopupControlID="Panel4"
TargetControlID="dummyButton"
BackgroundCssClass="ModalBGOpacity"
CancelControlID="ButtonCancel"
OnCancelScript="HideModalPopup()">
</cc1:ModalPopupExtender>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="dummyButton" />
</Triggers>
</asp:UpdatePanel>
Try getting the rendered id of your control, like that.
var modal = $find('<%=ModalPopupExtender1.CliendID%>');
I'm designing a website in ASP.NET and I want to build table with some text, textboxes and validators in it. The problem is that table looks different in Firefox and IE. Here is an example:
http://www.freeimagehosting.net/image.php?224860e266.png
Here is the table code in ASP.NET:
<table align="center" cellpadding="0" cellspacing="1" style="text-align: right; border-collapse: separate;">
<tr>
<td>
Nadawca:
</td>
<td>
<asp:TextBox ID="TextBoxNadawca" runat="server" Width="250px" BorderStyle="none"
BackColor="#c1ae85"></asp:TextBox>
</td>
<td align="left">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Nadawca jest wymagany."
ControlToValidate="TextBoxNadawca" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Adres e-mail:
</td>
<td>
<asp:TextBox ID="TextBoxMail" runat="server" Width="250px" BorderStyle="none" BackColor="#c1ae85"></asp:TextBox>
</td>
<td align="left">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="E-mail jest wymagany."
ControlToValidate="TextBoxMail" ForeColor="Red"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBoxMail"
ErrorMessage="Nieprawidłowy format." ForeColor="Red" Style="position: absolute;
top: 589px; left: 632px; width: 160px;" ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
Temat:
</td>
<td>
<asp:DropDownList ID="DropDownTemat" runat="server" Style="margin-left: 0px;" Width="250px"
BorderStyle="none" BackColor="#c1ae85">
<asp:ListItem>Reklama w serwisie</asp:ListItem>
<asp:ListItem>Pomysł na rozwój serwisu</asp:ListItem>
<asp:ListItem>Chcę zostać moderatorem</asp:ListItem>
<asp:ListItem>Prawa autorskie</asp:ListItem>
<asp:ListItem>Banicja</asp:ListItem>
<asp:ListItem>Błąd na stronie</asp:ListItem>
<asp:ListItem>Inne</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Treść:
</td>
<td>
<asp:TextBox ID="TextBoxTresc" runat="server" Height="150px" TextMode="MultiLine"
Width="250px" BorderStyle="none" BackColor="#c1ae85"></asp:TextBox>
</td>
<td align="left">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Treść jest wymagana."
ControlToValidate="TextBoxTresc" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td style="text-align: center;">
<asp:Button ID="Button1" runat="server" Text="Wyślij" OnClick="Button1_Click" Width="250px"
BorderStyle="None" BackColor="#c1ae85" />
</td>
</tr>
<tr>
<td>
</td>
<td style="text-align: justify">
<br />
<asp:Label ID="Label1" runat="server" Width="250px"></asp:Label>
</td>
</tr>
</table>
Thanks in advice,
Peter.
When i remove your styling code
<table align="center" cellpadding="0" cellspacing="1" style="text-align: right; border-collapse: separate;">
to
<table align="center">
It shows same for IE, Firefox and Chrome. So if you want to style your table ill suggest you to try CSS
Don't use tables for your layout, use CSS. The only time you should use tables is for tabular data. By using CSS here you can omit border-bottom where you are getting the double borders.
i want to reduce the spacing inside my web page:
The problem is the buttons below "back" and "next" is not visible without scrolling down
I have posted the code below:
<asp:View runat="server" ID="view_1">
<asp:ScriptManager ID="scrMgr" runat="server">
</asp:ScriptManager>
<h1 class="blue" style="margin-bottom:0px;">
<asp:Label ID="lbl_viewTitle1" runat="server" Text="Label"></asp:Label>
</h1>
<div style="margin:0px; padding:0px; border:none; clear:both;">
<table border="0">
<tr>
<td>
<table border="1" style="border-color: Green; border-width: thin;">
<tr>
<td valign="top" id="tdReadableContent" runat="server">
<div style="height: 167px; width:450px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="blue" style="height:16px!important;" colspan="3"><b>Your Current Settings</b></td>
</tr>
<tr style="width:10px"><td colspan="3"></td></tr>
<tr id="trUserDetail_read" runat="server">
<td class="tabRow" valign="baseline">
<asp:Label ID="lbl_view1_userID_Read" runat="server" Text="User ID"></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_view1_userID_Read" ReadOnly="true" runat="server" AutoPostBack="true"
CssClass="text_box_gray"></asp:TextBox><div class="smallText" nowrap>
<%--(This would be the ID you would normally log on with.)--%></div>
</td>
<td> </td>
</tr>
<tr>
<td width="150" class="tabRow">
<asp:Label ID="lbl_panview3_label2_read" runat="server" Text="Store Number "></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_panview3_input2_read" CssClass="text_box_gray" ReadOnly="true" runat="server" MaxLength="4"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td class="tabRow">
<asp:Label ID="lbl_view1_surname_read" runat="server" Text="Surname"></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_view1_surname_read" ReadOnly="true" CssClass="text_box_gray" runat="server"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr id="trFirstName_Read" runat="server">
<td width="150" class="tabRow">
<asp:Label ID="lbl_view1_firstName_Read" runat="server" Text="First Name"></asp:Label>
</td>
<td width="200">
<asp:TextBox ID="txt_view1_firstname_Read" ReadOnly="true" runat="server" CssClass="text_box_gray"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td></td>
<td>
<%--<asp:Label ID="Label1" CssClass="errorText" runat="server"></asp:Label>--%>
</td>
</tr>
<tr>
<td class="tabRow">
<%--<asp:Label ID="Label2" runat="server" Text="Employee Number "></asp:Label>--%>
</td>
<td width="200">
<%--<asp:TextBox ID="TextBox1" runat="server"
CssClass="text_box_3" MaxLength="10"></asp:TextBox>--%>
</td>
</tr>
</table>
</div>
<asp:Label runat="server" ID="label11"></asp:Label>
<hr class="hrRequestorForm" />
<div id="divRoleDepartment_ReadOnly" runat="server" style="margin-left:20px; height:390px; overflow:auto;" class="tabel1Parent">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<asp:Panel ID="panelStore_Read" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<asp:GridView ID="gvRoleDepartment_ReadOnly" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkRole_Read" runat="server" Enabled="false" />
<input type="hidden" id="hdRoleCode_Read" value="<%#Bind('ddl_code') %>" runat="server" />
<input type="hidden" id='hdDepCode_Read' value="<%#Bind('dep_code') %>" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ddl_item" HeaderText="Role" ItemStyle-CssClass="roleColumn2" />
<asp:BoundField DataField="dep_name" HeaderText="Department" ItemStyle-CssClass="departmentColumn" />
</Columns>
<EmptyDataTemplate>
<div class="tabel1Parent">
<table border='0' cellpadding='0' cellspacing='0' style='border-color: green; border-width: thin;
width: 390px; border-left: #9787b1 solid 1px; border-top: #9787b1 solid 1px;'>
<tr>
<td class='roleColumn'>
<b>Role</b>
</td>
<td class='departmentColumn'>
<b>Department</b>
</td>
</tr>
</table>
</div>
</EmptyDataTemplate>
</asp:GridView>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
</td>
<td>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</div>
</td>
<td valign="top" >
<div style="height:160px; width:450px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="blue" style="height:16px!important;" colspan="3"><b>
<asp:Label ID="lblNewSettings" runat='server' Text="Your New Settings"></asp:Label>
</b></td>
</tr>
<tr id="trUserDetail" runat="server">
<td class="tabRow" valign="baseline">
<asp:Label ID="lbl_view1_userID" runat="server" Text="User ID "></asp:Label>
</td>
<td class="textFieldColumn">
<asp:TextBox ID="txtUserID" TabIndex="1" text="Enter User id.."
runat="server" AutoPostBack="true"
CssClass="text_box_highlight"
onfocus="defaultStyle();"
onkeypress="ChangeUserIdBackground();"
MaxLength ="50"></asp:TextBox><span id="starUserId" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvUserID" runat="server" ControlToValidate="txtUserID"
ErrorMessage=" Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator><div class="smallText" nowrap>
(This would be the ID you would normally log on with.)</div></td>
</tr>
<tr>
<td colspan="2" style="padding-left:135px">
<asp:Label ID="lblUserExists" CssClass="errorText" runat="server"></asp:Label>
<asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server"
ControlToValidate="txt_panview3_input2" ErrorMessage="Store should be a number"
ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td width="150" class="tabRow">
<asp:Label ID="lbl_panview3_label2" runat="server" Text="Store Number "></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_panview3_input2" runat="server"
MaxLength="4" CssClass="text_box_3">0000</asp:TextBox>
<span id="starStoreNumber" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvStoreNumber" runat="server"
ControlToValidate="txt_panview3_input2" ErrorMessage=" Required field"
ValidationGroup="Form2" ></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="tabRow">
<asp:Label ID="lbl_view1_surname" runat="server" Text="Surname "></asp:Label>
</td>
<td >
<asp:TextBox ID="txt_view1_surname" runat="server"
CssClass="text_box_3"
MaxLength ="50"></asp:TextBox>
<span id="starSurName" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvSurName" runat="server" ControlToValidate="txt_view1_surname"
ErrorMessage=" Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator>
</td>
</tr>
<tr id="trFirstName" runat="server">
<td width="150" class="tabRow">
<asp:Label ID="lbl_view1_firstName" runat="server" Text="First Name"></asp:Label>
</td>
<td >
<asp:TextBox ID="txt_view1_firstname" runat="server"
CssClass="text_box_3"
MaxLength ="50"></asp:TextBox>
<span id="starFirstName" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txt_view1_firstname"
ErrorMessage=" Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="tabRow">
<asp:Label ID="lblEmployeeNumber" runat="server" Text="Employee Number "></asp:Label>
</td>
<td width="280">
<asp:TextBox ID="txtEmployeeNumber" runat="server"
CssClass="text_box_3" MaxLength="6"></asp:TextBox>
<span id="starEmployeeNumber" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvEmplyeeNumber" runat="server" ControlToValidate="txtEmployeeNumber"
ErrorMessage="Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator>
</td>
<td>
<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server"
ControlToValidate="txtEmployeeNumber" ErrorMessage="Enter a numeric value"
ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
</td>
</tr>
</table>
<b><asp:Label ID="lblCaption2" runat="server" Text="Note: All fields are mandatory" ForeColor="Red"></asp:Label></b>
</div>
<hr class="hrRequestorForm" />
<div style="padding-left:20px;" id="divRoleDepartment" runat="server">
<div class="tabel1Parent">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:Panel ID="panelStore" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<asp:GridView ID="gvRoleDepartment" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkRole" runat="server" />
<input id="hdRoleCode" runat="server" type="hidden"
value="<%#Bind('ddl_code') %>" />
<input id="hdDepCode" runat="server" type="hidden"
value="<%#Bind('dep_code') %>" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField ControlStyle-CssClass="roleColumn" ControlStyle-Width="300px"
DataField="ddl_item" HeaderText="Role" ItemStyle-CssClass="roleColumn" />
<asp:BoundField ControlStyle-CssClass="departmentColumn"
ControlStyle-Width="120px" DataField="dep_name" HeaderText="Department"
ItemStyle-CssClass="departmentColumn" />
</Columns>
</asp:GridView>
<span ID="lbl_chkBx_store_workunit" class="errorText"></span>
</td>
<td>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</div>
<br />
<div>
<table>
<tr>
<td>
<asp:Label ID="lblException" runat="server" CssClass="errorText"></asp:Label>
</td>
</tr>
</table>
</div>
<br />
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<br />
<div>
<table>
<tr>
<td>
<asp:Button ID="btn_view1_back" runat="server" Text="Back" CausesValidation="False"
ValidationGroup="Form2" />
<asp:Button ID="btn_View1_Next" runat="server" CausesValidation="true" Text="Next"
ValidationGroup="Form2" OnClientClick="return check_sel();" UseSubmitBehavior="True" />
<%
'mahesh code
'replaced OnClientClick="return ValidateDropDown(); with OnClientClick="return check_sel() "
%>
</td>
</tr>
</table>
</div>
<br />
</td>
</tr>
</table>
</div>
</asp:View>
Please help #!
You say your problem is that the buttons are not into view. You can scroll your control into view by using this technique. Or you can load the page on my screen, I have a bigger monitor.
What I'm trying to say: if it's visible on your screen after redesign, anybody with a smaller screen or a resized browser window still won't see it.
If you want to-the-point help on your HTML design, I suggest you upload a trimmed down example of your problem that we can copy and paste to test (or show an online link of your current page).
Lose the tables, or at the very least, remove the unnecessary <div> and <br> tags.
Another option, provided you do not have to support old versions of Internet Explorer, is to use position: fixed to "stick" your buttons to the bottom of the viewable window.
<div style="position: fixed; bottom: 0px;">
<asp:Button ID="btn_view1_back" ... />
<asp:Button ID="btn_view1_next" ... />
</div>