Element 'Listitem' is not a known element - html

I have a Drop down field, however List Items seem to be ignored. This is for an aspx project I am working on in Visual studio. Am I missing something? My code:
<form runat="server">
<asp:TextBox CssClass="form-control" ID ="dateField" runat="server" placeholder="Date (DD/MM/YYYY)"></asp:TextBox><br/>
<asp:DropDownList CssClass="form-control" runat="server" placeholder=""> </asp:DropDownList>
<asp:ListItem Text="General Waste" Value="General Waste"></asp:ListItem>
</form>

You have closed the DropDownList tag before the ListItem. ListItem should be IN the DropDownList.
<form runat="server">
<asp:TextBox CssClass="form-control" ID ="dateField" runat="server" placeholder="Date (DD/MM/YYYY)"></asp:TextBox><br/>
<asp:DropDownList CssClass="form-control" runat="server" placeholder="">
<asp:ListItem Text="General Waste" Value="General Waste"></asp:ListItem>
</asp:DropDownList>
</form>

Related

How to add an onClick event to an HTML radio button in asp.net

I have multiple tabs on my page and currently I am binding all dropdownlists on every tab at page load.
I want to bind the dropdownlists only when the tab is selected. I also want to clear the gridviews when the tab is changed.
This is my HTML code
<li>
<input type="radio" id="tab1d" name="tabs1" runat="server"/>
<label for="tab1d">Search</label>
<div id="tab-content1d" class="tab-content animated fadeIn" style="background-color:white; padding:10px; ">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label4" runat="server" Text="Select Platform"></asp:Label>
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged" CssClass="inputs" Width="150px"></asp:DropDownList>
<asp:Label ID="Label10" runat="server" Text="Select Family Name"></asp:Label>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" CssClass="inputs" Width="150px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"></asp:DropDownList>
<asp:Label ID="Label11" runat="server" Text="Select price Level"></asp:Label>
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true" CssClass="inputs" Width="150px" ></asp:DropDownList>
<asp:Button ID="Button7" runat="server" Text="Search" CssClass="buttons" OnClick="Button7_Click"/><br /><br />
<div id="gdvLeft">
<asp:GridView ID="gdvFamilyname" runat="server" EnableViewState="True" class="grid" RowStyle-CssClass="rows"></asp:GridView>
</div>
<div id="gdvRight">
<asp:GridView ID="gdvQuantity" runat="server" EnableViewState="True" class="grid" RowStyle-CssClass="rows"></asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</li>
Hi Himani, Try like this -
<input type="radio" value="Click Me" onclick="rdioClick();" />
In Javascript -
function rdioClick() {
var GridView1 = document.getElementById('GridView1');
GridView1.innerHTML = "";
}
Thanks :)

bootstrap loses glow form-control

I have a very strange problem happening with an ASP.NET 4.5 website, using bootstrap for styling. I have set the class of the controls to form-control-static for alignment purposes. However, I'm getting different display results across 3 browsers.
IE9, used by some of our users, the control glows when focused or on mouseover. This is fine.
Chrome, the textbox border will go blue when focused (but no glow). Nothing happens on mouseover (fine with me).
IE11, which is the main used browser for this app, controls do not glow nor change border color on focus. However, if I click into each textbox then tab to the next, the border turns to blue only on tabbing to the next field. The control stays blue bordered even as I navigate through different fields (see te following screenshot).
If I use form-control (not static) I get nice rounded controls with blue glow on focus. But the layout is not how I want it.
<div class="form-group">
<asp:Label ID="lblReduction" runat="server" Font-Bold="True" Text="Reduction:" Width="320px"></asp:Label>
<asp:DropDownList ID="ddlReduction" runat="server" AutoPostBack="True" CssClass="form-control-static" OnSelectedIndexChanged="ddlReduction_SelectedIndexChanged" Width="220px">
<asp:ListItem><-- Please Select --></asp:ListItem>
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:DropDownList>
</div>
<div class="form-group">
<asp:Label ID="lblDLACareComponentAward" runat="server" CssClass="form-control-static" Font-Bold="True" Text="DLA Care Component Payment Awarded (£):" Width="320px"></asp:Label>
<asp:TextBox ID="DLACareComponentAwardTextBox" runat="server" CssClass="form-control-static" MaxLength="8" Text='<%# Bind("DLACareComponentAward") %>' Width="220px" />
<asp:RequiredFieldValidator ID="reqvalDLACareAwarded" runat="server" ControlToValidate="DLACareComponentAwardTextBox" Display="Dynamic" Enabled="False" ErrorMessage="DLA Care Component Payment Required" font-bold="true" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexDLApaymentAwarded" runat="server" ControlToValidate="DLACareComponentAwardTextBox" Display="Dynamic" ErrorMessage="DLA Care Component Payment Awarded must be a money value" font-bold="true" ForeColor="Red" ValidationExpression="[0-9]+(\.[0-9][0-9]?)?" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
</div>
<div class="form-group">
<asp:Label ID="lblDLAMobilityComponentAward" runat="server" Font-Bold="True" Text="DLA Mobility Component Payment Awarded (£):" Width="320px"></asp:Label>
<asp:TextBox ID="DLAMobilityComponentAwardTextBox" runat="server" CssClass="form-control-static" MaxLength="8" Text='<%# Bind("DLAMobilityComponentAward") %>' Width="220px" />
<asp:RequiredFieldValidator ID="reqvalMobilityComponent" runat="server" ControlToValidate="DLAMobilityComponentAwardTextBox" Display="Dynamic" Enabled="False" ErrorMessage="DLA Mobility Component Payment" font-bold="true" ForeColor="Red" SetFocusOnError="True" ValidationGroup="PIP">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexDLApaymentAwarded0" runat="server" ControlToValidate="DLAMobilityComponentAwardTextBox" Display="Dynamic" ErrorMessage="DLA Mobility Component Payment Awarded must be a money value" font-bold="true" ForeColor="Red" ValidationExpression="[0-9]+(\.[0-9][0-9]?)?" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
</div>
<div class="form-group">
<asp:Label ID="lblDailyPIPPoints" runat="server" Font-Bold="True" Text="Daily PIP Points:" Width="320px"></asp:Label>
<asp:TextBox ID="DailyPIPPointsTextBox" runat="server" CssClass="form-control-static" MaxLength="10" Text='<%# Bind("DailyPIPPoints") %>' Width="220px" />
<asp:RequiredFieldValidator ID="reqvalDailyPIPPoints" runat="server" ControlToValidate="DailyPIPPointsTextBox" Display="Dynamic" Enabled="False" ErrorMessage="Daily PIP Points" font-bold="true" ForeColor="Red" SetFocusOnError="True" ValidationGroup="PIP">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexDailyPIP" runat="server" ControlToValidate="DailyPIPPointsTextBox" Display="Dynamic" ErrorMessage="Only numbers can be used for Daily PIP Points" font-bold="true" ForeColor="Red" ValidationExpression="^[0-9]*$" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
</div>
<div class="form-group">
<asp:Label ID="lblMobilityPIPPoints" runat="server" Font-Bold="True" Text="Mobility PIP Points:" Width="320px"></asp:Label>
<asp:TextBox ID="MobililtyPIPPointsTextBox" runat="server" CssClass="form-control-static" MaxLength="10" Text='<%# Bind("MobililtyPIPPoints") %>' Width="220px" />
<asp:RequiredFieldValidator ID="reqvalMobilityPIPPoints" runat="server" ControlToValidate="MobililtyPIPPointsTextBox" Display="Dynamic" Enabled="False" ErrorMessage="Mobility PIP Points" font-bold="true" ForeColor="Red" SetFocusOnError="True" ValidationGroup="PIP">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexMobilityPIPPoints" runat="server" ControlToValidate="MobililtyPIPPointsTextBox" Display="Dynamic" ErrorMessage="Only numbers can be used for Mobility PIP Points" font-bold="true" ForeColor="Red" ValidationExpression="^[0-9]*$" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
</div>
<asp:Panel ID="pnlPIP" runat="server" Visible="false">
<div class="form-group">
<asp:Label ID="lblPIPDailyLivingAward" runat="server" Font-Bold="True" Text="PIP Daily Living Award (£):" Width="320px"></asp:Label>
<asp:TextBox ID="PIPDailyLivingAwardTextBox" runat="server" CssClass="form-control-static" MaxLength="8" Text='<%# Bind("PIPDailyLivingAward") %>' Width="220px" />
<asp:RequiredFieldValidator ID="reqvalDailyLivingAward" runat="server" ControlToValidate="PIPDailyLivingAwardTextBox" Display="Dynamic" Enabled="False" ErrorMessage="PIP Daily Living Award Required" font-bold="true" ForeColor="Red" SetFocusOnError="True" ValidationGroup="PIP">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexDLApaymentAwarded1" runat="server" ControlToValidate="PIPDailyLivingAwardTextBox" Display="Dynamic" ErrorMessage="PIP Daily Living Awarded must be a money value" font-bold="true" ForeColor="Red" ValidationExpression="[0-9]+(\.[0-9][0-9]?)?" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
</div>
<div class="form-group">
<asp:Label ID="lblPIPMobilityAward" runat="server" Font-Bold="True" Text="PIP Mobility Award (£):" Width="320px"></asp:Label>
<asp:TextBox ID="PIPMobilityAwardTextBox" runat="server" CssClass="form-control-static" MaxLength="8" Text='<%# Bind("PIPMobilityAward") %>' Width="220px" />
<asp:RequiredFieldValidator ID="reqvalmobilityAward" runat="server" ControlToValidate="PIPMobilityAwardTextBox" Display="Dynamic" Enabled="False" ErrorMessage="PIP mobility Award Required" font-bold="true" ForeColor="Red" SetFocusOnError="True" ValidationGroup="PIP">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexDLApaymentAwarded2" runat="server" ControlToValidate="PIPMobilityAwardTextBox" Display="Dynamic" ErrorMessage="PIP Mobility Award must be a money value" font-bold="true" ForeColor="Red" ValidationExpression="[0-9]+(\.[0-9][0-9]?)?" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
</div>
</asp:Panel>
<asp:Panel ID="pnlAppealLodged" runat="server" Visible="false">
<div class="form-group">
<asp:Label ID="lblAppealLodged" runat="server" Font-Bold="True" Text="Appeal Lodged:" Width="320px"></asp:Label>
<asp:DropDownList ID="ddlAppealLodged" runat="server" AutoPostBack="True" CssClass="form-control-static" OnSelectedIndexChanged="ddlAppealLodged_SelectedIndexChanged" Width="220px">
<asp:ListItem Value="0"><-- Please Select --></asp:ListItem>
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:DropDownList>
</div>
</asp:Panel>
<asp:Panel ID="pnlAppealDate" runat="server" Visible="false">
<div class="form-group">
<asp:Label ID="lblAppealLodgedDate" runat="server" Font-Bold="True" Text="Date Appeal Lodged:" Width="320px"></asp:Label>
<asp:TextBox ID="txtDateLodged" runat="server" CssClass="form-control-static" Width="220px"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtDateLodged" WatermarkCssClass="txtwatermark" WatermarkText="dd/mm/yyyy" />
</div>
<asp:RegularExpressionValidator ID="regexDateAppealLodged" runat="server" ControlToValidate="txtDateLodged" Display="Dynamic" ErrorMessage="* Enter a valid Termination Date (DD/MM/YYYY)" font-bold="true" ForeColor="Red" ValidationExpression="^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((19|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
</asp:Panel>
<div class="form-group">
<asp:Label ID="lblVSSInterest" runat="server" Font-Bold="True" Text="VSS Interest Confirmed:" Width="320px"></asp:Label>
<asp:DropDownList ID="ddlVSS" runat="server" AutoPostBack="True" CssClass="form-control-static" OnSelectedIndexChanged="ddlVSS_SelectedIndexChanged" Width="220px">
<asp:ListItem Value="0"><-- Please Select --></asp:ListItem>
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:DropDownList>
<div>
<br />
<asp:Panel ID="pnlCRIType" runat="server" Visible="false">
<div class="form-group">
<asp:Label ID="lblCRIType" runat="server" Font-Bold="True" Text="CRI Type:" Width="320px"></asp:Label>
<asp:DropDownList ID="ddlCRIType" runat="server" CssClass="form-control-static" Width="220px">
<asp:ListItem Value="0"><-- Please Select --></asp:ListItem>
<asp:ListItem>Psychological</asp:ListItem>
<asp:ListItem>Physical</asp:ListItem>
<asp:ListItem>Psychological & Physical</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
</div>
</asp:Panel>
<div class="form-group">
<asp:Label ID="lblDLATerminationDate" runat="server" Font-Bold="True" Text="DLA Termination Date:" Width="320px"></asp:Label>
<asp:TextBox ID="DLATerminationDateTextBox" runat="server" CssClass="form-control-static" MaxLength="10" Text='<%# Bind("DLATerminationDate") %>' Width="220px" />
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="DLATerminationDateTextBox" WatermarkCssClass="txtwatermark" WatermarkText="dd/mm/yyyy" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="DLATerminationDateTextBox" Display="Dynamic" ErrorMessage="* Enter a valid Termination Date (DD/MM/YYYY)" font-bold="true" ForeColor="Red" ValidationExpression="^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((19|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$" ValidationGroup="PIP">*</asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="reqvalTerminationDate" runat="server" ControlToValidate="DLATerminationDateTextBox" Display="Dynamic" Enabled="False" ErrorMessage="DLA Termination Date Required" font-bold="true" ForeColor="Red" SetFocusOnError="True" ValidationGroup="PIP">*</asp:RequiredFieldValidator>
</div>
<br />
<div class="row text-center">
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" cssclass="btn btn-success" OnClick="InsertButton_Click" OnClientClick="changeTextPIP()" Text="Insert" ValidationGroup="PIP" Width="125px" />
<asp:Button ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" cssclass="btn" onclick="InsertCancelButton_Click" Text="Cancel" ValidationGroup="PIP" Width="125px" />
</div>
<br />
</div>
</div>
</InsertItemTemplate>

how to control space between radiobuttons of the radiobuttonlist control

I am having lot of space between newly added radiobuttons(yes and No) of the RadioButtonList and the first part of the existing region(divName) is aligned properly.
can any body help me in aligning the newly added second region(div1)
<div id="divpanelFacts" runat="server">
<fieldset id="panelFacts">
<table width="100%">
<tr>
<td>
<div id="divName" runat="server" visible="false">
<span>
<label runat="server" id="Label1">
<span id="pNameSpan" runat="server">*</span>P Name</label>
<asp:TextBox ID="textPName" runat="server" MaxLength="20"></asp:TextBox>
</span>
</div>
</td>
<td>
<div id="div1" runat="server" visible="false">
<asp:Label ID="lbl1" runat="server" Text="Would like to use this option for document purpose"></asp:Label>
<asp:RadioButtonList ID="rbl1" runat="server" TextAlign="Left" RepeatDirection="Horizontal">
<asp:ListItem Value="Yes" Text="Yes" />
<asp:ListItem Value="No" Text="No" Selected="True" />
</asp:RadioButtonList>
</div>
</td>
</tr>
</table>
</fieldset>
</div>
Your table width is at 100%, which means it's going to stretch it, and table I think takes precedence.

ajax update not working

I am trying to get a combobox to update with the correct value when a button has been clicked.
So when the user chooses a year in the combobox then enters a day in the 'HolidayYearAllocation' input box and clicks the button, the combobox called 'AssignUserHoliday' needs to update with the year selected.
Here is the code where i select the year, and then enter an amount and click the button
<asp:UpdatePanel ID="UpdateBulkHoliday" runat="server" class="BulkHolidayAllocation">
<ContentTemplate>
<div class="BulkHolidayAllocationHeader">
<asp:Label ID="lbl_bulkholidayallocationheader" runat="server" Text="Bulk Holiday Allocation" />
</div>
<div class="SelectYearHolidayAllocation">
<asp:Label ID="lbl_selectyearholidayallocation" runat="server" Text="Select Year" CssClass="applicationfont" />
<asp:DropDownList ID="ddl_selectyearholidayallocation" runat="server" CssClass="smallinputbox" />
</div>
<div class="EnterYearHolidayAllocation">
<asp:Label ID="lbl_enteryearholidayallocation" runat="server" Text="Enter Amount of Days" CssClass="applicationfont" />
<input id="txt_enteryearholidayallocation" runat="server" class="smallinputbox" />
</div>
<div class="SubmitYearHolidayAllocation">
<input id="btn_submityearholidayallocation" runat="server" type="button" class="Button" value="Add" onserverclick="btn_submityearholidayallocation_ServerClick" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
Here is the update panel wrapped around the code i want to update after button click.
<asp:UpdatePanel id="Update" runat="Server">
<ContentTemplate>
<div class="UserSettingsSection2">
<div class="AssignUserHoliday">
<asp:Label ID="lbl_assignuserholiday" runat="server" Text="Assign User Holiday" CssClass="applicationfont" />
<asp:DropDownList ID="ddl_assignuserholiday" runat="server" CssClass="smallinputbox" Enabled="false" AutoPostBack="true" OnDataBound="ddl_assignuserholiday_DataBound" OnSelectedIndexChanged="ddl_assignuserholiday_SelectedIndexChanged" />
</div>
<div class="SetNewUserHoliday">
<asp:Label ID="lbl_setnewuserholiday" runat="server" Text="New Holiday Amount" CssClass="applicationfont" />
<input id="txt_setnewuserholiday" runat="server" class="smallinputbox" />
</div>
<div class="SubmitNewUserHoliday">
<input id="btn_submitnewuserholiday" runat="server" class="Button" type="button" value="Change" visible="false" onserverclick="btn_submitnewuserholiday_ServerClick" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
You will have to add following attribute to both update panel UpdateMode="Conditional" and call Update.Update() in the btn_submityearholidayallocation_ServerClick method once you have assigned the values to the controls in the second panel.

Adding asp table inside Templatefield

Here i have a problem with adding asp table inside the template field in gridview.
in my gridview one button is there named as "View" when i click this it should display all information below that row... so how do i do that??? should i use template field?? how to add button("View") for each row using this template field
Please correct my code
<asp:TemplateField HeaderText="View">
<ItemTemplate>
<asp:Table ID="tblModify" runat="server" Width="100%" Visible="False" CssClass="table">
<asp:TableRow>
<asp:TableCell ID="TableCell35" runat="server" HorizontalAlign="Right"><h1>Debit Information</h1></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow6" runat="server">
<asp:TableCell ID="TableCell3" runat="server" HorizontalAlign="Right">DebitNoteNumber</asp:TableCell><asp:TableCell
ID="TableCell4" runat="server">
<asp:Label ID="lblDebitNoteId" runat="server" MaxLength="50" Columns="70" />
</asp:TableCell><asp:TableCell ID="TableCell5" runat="server" HorizontalAlign="Right">Date</asp:TableCell><asp:TableCell
ID="TableCell6" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblDate" runat="server" MaxLength="30" Columns="50"></asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow1" runat="server">
<asp:TableCell ID="TableCell11" runat="server" HorizontalAlign="Right">Patient Name</asp:TableCell><asp:TableCell
ID="TableCell37" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblPatientName" runat="server" MaxLength="50" Columns="70"></asp:Label>
</asp:TableCell>
<asp:TableCell ID="TableCell1" runat="server" HorizontalAlign="Right">Patient Number</asp:TableCell><asp:TableCell
ID="TableCell2" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblPatientId" runat="server" MaxLength="50" Columns="70"></asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow2" runat="server">
<asp:TableCell ID="TableCell38" runat="server" HorizontalAlign="Right">Phone Number</asp:TableCell><asp:TableCell
ID="TableCell39" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblPatientPhoneNumber" runat="server"> </asp:Label>
</asp:TableCell>
<asp:TableCell ID="TableCell7" runat="server" HorizontalAlign="Right">Bill Number</asp:TableCell><asp:TableCell
ID="TableCell8" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblBillId" runat="server"> </asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow5" runat="server">
<asp:TableCell ID="TableCell9" runat="server" HorizontalAlign="Right">Receipt Number</asp:TableCell><asp:TableCell
ID="TableCell10" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblReceiptId" runat="server" MaxLength="30" Columns="50"></asp:Label>
</asp:TableCell><asp:TableCell ID="TableCell13" runat="server" HorizontalAlign="Right">Amount</asp:TableCell><asp:TableCell
ID="TableCell14" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblAmount" runat="server" MaxLength="30" Columns="50"></asp:Label>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow8" runat="server">
<asp:TableCell ID="TableCell15" runat="server" HorizontalAlign="Right">Balacne</asp:TableCell><asp:TableCell
ID="TableCell16" runat="server" HorizontalAlign="Left">
<asp:Label ID="lblBalacne" runat="server" MaxLength="30" Columns="50"></asp:Label></td>
</asp:TableCell><asp:TableCell></asp:TableCell><asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:TemplateField>
if i use this code, i could't find button("View") in my gridview...
U can use Modal Pop Up Extender.
write simple html table tag(TR,TD) with your server side tag into the modal pop up.When You click on "View" the details will be shown into Modal pop up.