Error in parsing asp.net page - c#

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled
Details: Error parsing near <HTML><HEAD><TITLE><
Please help me out , this is bugging me....
<body>
<form id="form1" runat="server">
<aspAtlas:ScriptManager ID="MyScriptManager" runat="server" AllowCustomErrorsRedirect="true">
</aspAtlas:ScriptManager>
<div class="headerborder" id="hd_SubmissionGuidelines">
<aspAtlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="t_head">
<asp:HiddenField ID="hfdSizeAttached" runat="server" />
<asp:HiddenField ID="hfdConfidentialDoc" runat="server" />
<asp:HiddenField ID="hfdJustificationDoc" runat="server" />
<asp:HiddenField ID="hfdRedactedVersionDoc" runat="server" />
<asp:Button ID="btnHiddenAttachDoc" runat="server" Style="visibility: hidden" OnClick="btnHiddenAttachDoc_Click" />
<asp:HiddenField ID="hdnDocsAttached" runat="server"></asp:HiddenField>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<aspAtlas:AsyncPostBackTrigger ControlID="btnAgree" EventName="Click" />
<aspAtlas:PostBackTrigger ControlID="btnSubmit" />
<aspAtlas:AsyncPostBackTrigger ControlID="btnBack" EventName="Click" />
<aspAtlas:AsyncPostBackTrigger ControlID="btnHiddenAttachDoc" EventName="Click" />
</Triggers>
</aspAtlas:UpdatePanel>
</div>
<aspAtlas:UpdatePanel ID="UpdPagePanel" runat="server">
<ContentTemplate>
<asp:Panel ID="pnlSubmissionGuidelines" runat="server">
<div class="div_main" id="hd_MainGuidelines">
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="t_guidelines_head">
Doc Submit
</td>
</tr>
<tr>
<td class="t_guidelines_subhead">
Definitions:
</td>
</tr>
<tr>
<td class="t_guidelines_text">
Dummy lines
<br />
<br />
Dummy lines
<br />
<br />
dummy lines
<br />
<br />
dummy lines
</td>
</tr>
<tr>
<td class="t_guidelines_subhead">
dummy lines
</td>
</tr>
<tr>
<td class="t_guidelines_text">
<font style="text-decoration: underline">Process</font>
<br />
<br />
dummy lines
<br />
<br />
dummy lines
<br />
dummy lines
<br />
<br />
<font class="t_guidelines_ul">Trade Secret </font>
<br />
<font class="t_guidelines_ul">Sample </font><br />
<font class="t_guidelines_ul">Sample text</font>
<br />
<br />
dummy lines
<br />
<br />
<font style="text-decoration: underline">Sample text</font>
<br />
<br />
dummy lines
<br />
<br />
<font class="t_guidelines_ul">Sample ddffvdffvdfgvfv
simple text; </font>
<br />
<font class="t_guidelines_ul">simple text; </font>
<br />
<font class="t_guidelines_ul">simple text; </font>
<br />
<font class="t_guidelines_ul">simple text;</font><br />
<font class="t_guidelines_ul">simple text; </font>
<br />
<font class="t_guidelines_ul">and</font><br />
<font class="t_guidelines_ul">simple text.</font><br />
<br />
<br />
<font style="text-decoration: underline">simple text</font>
<br />
<br />
simple text
<br />
<br />
</td>
</tr>
<tr>
<td align="center">
<asp:Button ID="btnAgree" runat="server" CssClass="top_button" OnClick="btnAgree_Click"
Text="I Agree" />
<asp:Button ID="btnDisagree" runat="server" CssClass="top_button" Text="I Disagree"
OnClientClick="javascript:window.close();" />
</td>
</tr>
</table>
</div>
</div>
</asp:Panel>
<asp:Panel ID="pnlConfidentialDocuments" runat="server">
<table width="99%" cellspacing="0" style="border-left: 1px solid #C3C3C3; border-right: 1px solid #C3C3C3;
border-bottom: 1px solid #C3C3C3;" cellpadding="0" align="center" id="Table1">
<tr class="headerborder">
<td class="t_head">
<span id="Conf_Docs_Close" style="cursor: hand" onclick="hideArea('Conf_Docs','Conf_Docs_Close','Conf_Docs_Open')">
-</span><span id="Conf_Docs_Open" onclick="showArea('Conf_Docs','Conf_Docs_Open','Conf_Docs_Close')"
style="cursor: hand; display: none">+</span> Add Confidential Documents
</td>
</tr>
<tr id="Conf_Docs">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="left" id="Table2">
<tr valign="top">
<td class="astrik">
</td>
<td class="form_field">
<img style="vertical-align: top" alt="Required Field" src="../Images/MandatoryField.gif" />
<asp:Label ID="LblDocType" runat="server"><label for='<%= ddlDocumentType.ClientID %>'>Document Type</label></asp:Label>
</td>
<td class="form_element">
<asp:DropDownList ID="ddlDocumentType" runat="server" CssClass="form_select">
</asp:DropDownList>
<a id="lnkDocumentClassificationHelp" runat="server" onclick="window.open('http://google.com');return false;">
<img src="<% =Request.ApplicationPath %>/images/help_icon.gif" alt='Document Classification Help'
width='16' height='16' /></a>
</td>
<td>
</td>
</tr>
<tr>
<td class="astrik">
</td>
<td class="form_field" style="vertical-align: top">
<img style="vertical-align: top" alt="Required Field" src="../Images/MandatoryField.gif" />
<asp:Label ID="LblDocTitle" runat="server"><label for='<%= txtDocTitle.ClientID %>'>Document Title</label></asp:Label>
</td>
<td class="form_element" colspan="2">
<asp:TextBox ID="txtDocTitle" runat="server" CssClass="textarea_Conf" TextMode="MultiLine"
MaxLength="2000" Rows="10" />
<br />
<asp:Label ID="lblDocTitleLength" runat="server" CssClass="form_label_textareaLength"
Text="Characters remaining: 2000"></asp:Label>
</td>
</tr>
<tr>
<td colspan="4">
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="left" id="Table3">
<tr>
<td class="form_element" align="right">
<asp:Button ID="btnAttachDocs" runat="server" CssClass="top_button" Text="Attach Document"
OnClientClick="javascript:return OpenAttachDocPopup()" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr class="bottomborder">
<td class="toptr">
<asp:Button ID="btnSubmit" Text="Done" CssClass="top_button" runat="server" OnClientClick="javascript:return Validate();"
OnClick="btnSubmit_Click" />
<asp:Button ID="btnBack" Text="Back" CssClass="top_button" runat="server" OnClick="btnBack_Click" />
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="pnlConfidentialDocsGrid" runat="server" Visible="false">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="t_head">
Attached Documents
</td>
</tr>
<tr>
<td>
<asp:DataGrid ID="dgdDocuments" runat="server" Width="100%" OnDeleteCommand="dgdDocuments_Delete"
DataKeyField="DocGuidName" AutoGenerateColumns="false" OnItemDataBound="dgdDocuments_ItemDataBound">
<HeaderStyle CssClass="t_grid_subheadin" />
<ItemStyle CssClass="t_grid_datain" />
<AlternatingItemStyle CssClass="t_grid_datainalt" />
<Columns>
<asp:TemplateColumn ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Image ID="ImgSecurity" runat="server" ToolTip="Confidential" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "SecurityImageDisplay") %>' />
<asp:Label ID="HiddenSecurity" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "SecurityImageDisplay") %>' />
<asp:HiddenField ID="hfdIsJustification" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "IsJustificationDoc").ToString() %>' />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn ItemStyle-Width="3" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Image ID="ImgMimeType" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "MimeTypeImagePath") %>' />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Document Type" ItemStyle-Width="18%">
<ItemTemplate>
<asp:Label ID="LblType" runat="server" Text='<%# ((WSMatter.IDNameEntity)DataBinder.Eval(Container.DataItem, "DocType")).Name %>'></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Document Title" ItemStyle-Width="50%">
<ItemTemplate>
<asp:Label ID="LblTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DocTitle") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="File Name" ItemStyle-Width="16%">
<ItemTemplate>
<asp:Label ID="LblName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DocName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Size" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LblSize" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SizetoDisplay") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="LnkDelete" runat="server" CommandName="Delete"><img src="../Images/nok.gif" alt="Delete"/></asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<asp:HiddenField ID="HdnTotalSizeAttached" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
<Triggers>
<aspAtlas:AsyncPostBackTrigger ControlID="btnAgree" EventName="Click" />
<aspAtlas:PostBackTrigger ControlID="btnSubmit" />
<aspAtlas:AsyncPostBackTrigger ControlID="btnBack" EventName="Click" />
<aspAtlas:AsyncPostBackTrigger ControlID="btnHiddenAttachDoc" EventName="Click" />
</Triggers>
</aspAtlas:UpdatePanel>
</form>
</body>

As per your code it seems you are not using masterpage, and you have not shown us your tag, so I assume following could help you.
Normally in asp.net webforms, <Head> tag is attributed as
runat="server", So you may try <head runat="server">
Note: I have written it as an answer because there are many comments on the answer, it alerts the moderators. So better new comments get after the answers.
Edit:
This error occurs on the server while processing the response to an asynchronous postback.
There are some links to solve this issue, check it they help:
http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx
http://forums.asp.net/t/1038252.aspx/1/10
ASP.NET Ajax Error: Sys.WebForms.PageRequestManagerParserErrorException

Related

How to bind nested repeater using imagebutton in updatepanel

I was using a simple html img with jQuery to show the nested table and binding the repeater on itemdatabound. Problem is, this was very expensive by getting all sub items from items in the list at the same time. So I decided it's better when i click the collapse image to show the nested table I should bind the repeater in there.
For this I use imagebutton and command argument to get the ID and use update panel to stop postback from button, but the repeater won't update?
<asp:ScriptManager runat="server"></asp:ScriptManager>
<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="rptInventarioLocalizacoes_ItemCommand">
<HeaderTemplate>
<table id="tblInventarioLocalizacoes" class="table table-bordered table-striped dataTable text-center">
<thead class="thead-dark">
<tr>
<th></th>
<th>Nª</th>
<th>Localização</th>
<th>Etq. Por Inventariar</th>
<th>Etq. Inventariadas</th>
<th>Precisão</th>
</tr>
</thead>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:ImageButton ID="ibtnCollapse" runat="server" Style="cursor: pointer" ImageUrl="../../Images/Collapse/plus.png" Width="20" CommandName="BindEtiquetas" CommandArgument='<%# Eval("Localizacao") %>' />
<asp:Panel ID="pnlInventarioEtiquetas" runat="server" Style="display: none">
<asp:UpdatePanel runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ibtnCollapse" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:Repeater ID="rptLocalizacoesEtiquetas" runat="server">
<HeaderTemplate>
<table id="tblLocalizacoesEtiquetas" class="nestedtable table table-bordered table-striped dataTable">
<thead class="thead-dark">
<tr>
<th>#</th>
<th>Etiqueta</th>
<th>Validar</th>
</tr>
</thead>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblRowIndex" runat="server" Text='<%# (((RepeaterItem)Container).ItemIndex + 1) %>' />
</td>
<td>
<asp:Label ID="lblEtiqueta" runat="server" Text='<%# Eval("Etiqueta") %>' />
</td>
<td>
<asp:CheckBox ID="chkEtiqueta" runat="server" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
<asp:Button ID="btnAddEtiqueta" runat="server" CssClass="btn btn-default" Text="Adicionar Etiqueta" BackColor="#020023" ForeColor="White" Font-Bold="true" />
<asp:Button ID="btnInventariar" runat="server" CssClass="btn btn-default" Text="Inventariar Etiquetas" BackColor="#020023" ForeColor="White" Font-Bold="true" />
</FooterTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</td>
<td>
<asp:Label ID="lblRowIndex" runat="server" Text='<%# (((RepeaterItem)Container).ItemIndex + 1) %>' />
<asp:Label ID="lblIdlocalizacao" runat="server" Text='<%# Eval("IdInventarioLocalizacao") %>' Style="display: none" />
</td>
<td>
<asp:Label ID="lblLocalizacao" runat="server" Text='<%# Eval("Localizacao") %>' />
</td>
<td>
<asp:Label ID="lblEtiquetasPorInventariar" runat="server" Text='<%# Eval("EtiquetasPorInventariar") %>' />
</td>
<td>
<asp:Label ID="lblEtiquetasInventariadas" runat="server" Text='<%# Eval("EtiquetasInventariadas") %>' />
</td>
<td>
<asp:Label ID="lblPrecisao" runat="server" Text='<%# Eval("Precisao") %>' />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>

Losing user input data in RadGrid after a dynamic row is created on click of ImageButton

I have an aspx page containing a grid-view. During a post-back of the grid, the data bound to the grid-view are lost. What could be the reason?
I have attached code below which the user input data on controls disappears when the image button is clicked.
aspx page:
<telerik:RadGrid ID="GridOfficeInfo" runat="server" AllowMultiRowSelection="false" OnItemCommand="GridOfficeInfo_ItemCommand" BorderWidth="0" AutoGenerateColumns="false" Width="100%" Visible="true" >
<MasterTableView>
<Columns>
<telerik:GridTemplateColumn>
<HeaderStyle BorderWidth="0" HorizontalAlign="Center" CssClass="OfficeInfoHeader" />
<ItemStyle BorderWidth="0" HorizontalAlign="Center" CssClass="OfficeRow" />
<HeaderTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left">
<asp:Label runat="server" ID="Label1" Text="Office Info" CssClass="Label">
</asp:Label>
</td>
<%-- <td align="right">
<asp:LinkButton ID="lnkOfficeInfo" runat="server" Font-Underline="true" Text="Click here for map" OnClick="lnkOfficeInfo_Click" CssClass="Label">
</asp:LinkButton>
</td>
--%>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table id="TableOfficeinfo" border="0" width="100%" runat="server">
<col style="width:16%;" />
<col style="width:18%;" />
<col style="width:15%;" />
<col style="width:18%;" />
<col style="width:15%;" />
<col style="width:18%;" />
<tr>
<td align="left" colspan="2" style="border-width:0;">
<asp:Label ID="LblOffice" Text="Primary Practice Location" runat="server" CssClass="LabelItalics">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:Label ID="LblBillAdd" Text="Billing Address" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:CheckBox runat="server" ID="ChkBillAdd" Checked="false" CssClass="ProviderCb" AutoPostBack="true" OnCheckedChanged="ChkBillAdd_CheckedChanged" />
</td>
<td align="right" colspan="2" style="border-width:0;">
<asp:LinkButton ID="lnkOfficeMap" runat="server" Font-Underline="true" Text="Click here for map" OnClick="lnkOfficeInfo_Click" CssClass="Label">
</asp:LinkButton>
</td>
</tr>
<tr>
<td align="left" style="border-width:0;">
<asp:Label ID="LblStreet" Text="Street Address" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtStreet" Text='<%#Eval("StreetAddress")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>
</td>
<td align="left" style="border-width:0;">
<asp:Label ID="LblSuite" Text="Suite" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtSuite" Text='<%#Eval("Suite")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>
</td>
<td align="left" style="border-width:0;">
<asp:Label runat="server" ID="LblCity" Text="City" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtCity" Text='<%#Eval("City")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>
</td>
</tr>
<tr>
<td align="left" style="border-width:0;">
<asp:Label ID="LblState" Text="State" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtState" Text='<%#Eval("State")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>
<telerik:RadComboBox runat="server" ID="cbOfficeInfo" CssClass="ProviderCombo" Visible="false" EnableTextSelection="true" SortCaseSensitive="false" Height="100">
<Items>
<telerik:RadComboBoxItem runat="server" Text="Choose State" />
<telerik:RadComboBoxItem runat="server" Text="AL" />
<telerik:RadComboBoxItem runat="server" Text="AK" />
<telerik:RadComboBoxItem runat="server" Text="AZ" />
<telerik:RadComboBoxItem runat="server" Text="AR" />
<telerik:RadComboBoxItem runat="server" Text="CA" />
<telerik:RadComboBoxItem runat="server" Text="CO" />
<telerik:RadComboBoxItem runat="server" Text="CT" />
<telerik:RadComboBoxItem runat="server" Text="DE" />
<telerik:RadComboBoxItem runat="server" Text="DC" />
<telerik:RadComboBoxItem runat="server" Text="FL" />
<telerik:RadComboBoxItem runat="server" Text="GA" />
<telerik:RadComboBoxItem runat="server" Text="HI" />
<telerik:RadComboBoxItem runat="server" Text="ID" />
<telerik:RadComboBoxItem runat="server" Text="IL" />
<telerik:RadComboBoxItem runat="server" Text="IN" />
<telerik:RadComboBoxItem runat="server" Text="IA" />
<telerik:RadComboBoxItem runat="server" Text="KS" />
<telerik:RadComboBoxItem runat="server" Text="KY" />
<telerik:RadComboBoxItem runat="server" Text="LA" />
<telerik:RadComboBoxItem runat="server" Text="ME" />
<telerik:RadComboBoxItem runat="server" Text="MD" />
<telerik:RadComboBoxItem runat="server" Text="MA" />
<telerik:RadComboBoxItem runat="server" Text="MI" />
<telerik:RadComboBoxItem runat="server" Text="MN" />
<telerik:RadComboBoxItem runat="server" Text="MS" />
<telerik:RadComboBoxItem runat="server" Text="MO" />
<telerik:RadComboBoxItem runat="server" Text="MT" />
<telerik:RadComboBoxItem runat="server" Text="NE" />
<telerik:RadComboBoxItem runat="server" Text="NV" />
<telerik:RadComboBoxItem runat="server" Text="NH" />
<telerik:RadComboBoxItem runat="server" Text="NJ" />
<telerik:RadComboBoxItem runat="server" Text="NM" />
<telerik:RadComboBoxItem runat="server" Text="NY" />
<telerik:RadComboBoxItem runat="server" Text="NC" />
<telerik:RadComboBoxItem runat="server" Text="ND" />
<telerik:RadComboBoxItem runat="server" Text="OH" />
<telerik:RadComboBoxItem runat="server" Text="OK" />
<telerik:RadComboBoxItem runat="server" Text="OR" />
<telerik:RadComboBoxItem runat="server" Text="PA" />
<telerik:RadComboBoxItem runat="server" Text="RI" />
<telerik:RadComboBoxItem runat="server" Text="SC" />
<telerik:RadComboBoxItem runat="server" Text="SD" />
<telerik:RadComboBoxItem runat="server" Text="TN" />
<telerik:RadComboBoxItem runat="server" Text="TX" />
<telerik:RadComboBoxItem runat="server" Text="UT" />
<telerik:RadComboBoxItem runat="server" Text="VT" />
<telerik:RadComboBoxItem runat="server" Text="VA" />
<telerik:RadComboBoxItem runat="server" Text="WA" />
<telerik:RadComboBoxItem runat="server" Text="WV" />
<telerik:RadComboBoxItem runat="server" Text="WI" />
<telerik:RadComboBoxItem runat="server" Text="WY" />
</Items>
</telerik:RadComboBox>
</td>
<td align="left" style="border-width:0;">
<asp:Label ID="LblZip" Text="Zip" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtZip" Text='<%#Eval("Zip")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>
</td>
<td align="left" style="border-width:0;">
<asp:Label runat="server" ID="LblContact" Text="Office Contact" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtContact" Text='<%#Eval("OfficeContact")%>' Enabled="true" CssClass="ProviderTextbox">
</asp:TextBox>
</td>
</tr>
<tr>
<td align="left" style="border-width:0;">
<asp:Label ID="LblEMRUsed" Text="EMR Used" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<telerik:RadComboBox runat="server" ID="CbEMRUsed" EnableTextSelection="true" CssClass="ProviderCombo" AutoPostBack="true" OnSelectedIndexChanged="CbEMRUsed_SelectedIndexChanged">
<Items>
<telerik:RadComboBoxItem runat="server" Text="Yes" />
<telerik:RadComboBoxItem runat="server" Text="No" />
</Items>
</telerik:RadComboBox>
</td>
<td align="left" style="border-width:0;">
<asp:Label ID="LblEMRName" Text="EMR Name" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<telerik:RadComboBox runat="server" ID="CbEMRName" EnableTextSelection="true" CssClass="ProviderCombo" Height="200">
<Items>
<telerik:RadComboBoxItem runat="server" Text="Select" Selected="true" />
</Items>
</telerik:RadComboBox>
</td>
<td align="left" style="border-width:0;">
<asp:Label runat="server" ID="LblUse" Text="Meaningful Use" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:CheckBox runat="server" ID="MeaningUse" Checked="false" CssClass="ProviderCb" AutoPostBack="true" OnCheckedChanged="MeaningUse_CheckedChanged"/>
</td>
</tr>
<tr>
<td align="left" style="border-width:0;">
<asp:Label ID="LblOffTel1" Text="Office Tel # 1" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<telerik:RadMaskedTextBox ID="TxtOffTel1" runat="server" Enabled="false" Mask="(###) ###-####" Width="88.5%" Text='<%#Eval("OfficeTel_1")%>' DisabledStyle-BackColor="#E5E5E5">
</telerik:RadMaskedTextBox>
<%--<asp:TextBox runat="server" ID="TxtOffTel1" Text='<%#Eval("OfficeTel_1")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>--%>
</td>
<td align="left" style="border-width:0;">
<asp:Label ID="LblOffTel2" Text="Office Tel # 2" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<telerik:RadMaskedTextBox ID="TxtOffTel2" runat="server" Enabled="false" Mask="(###) ###-####" Width="88.5%" Text='<%#Eval("OfficeTel_2")%>' DisabledStyle-BackColor="#E5E5E5">
</telerik:RadMaskedTextBox>
<%--<asp:TextBox runat="server" ID="TxtOffTel2" Text='<%#Eval("OfficeTel_2")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>--%>
</td>
<td align="left" style="border-width:0;">
<asp:Label runat="server" ID="LblOffFax" Text="Office Fax" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<telerik:RadMaskedTextBox ID="TxtOffFax" runat="server" Enabled="false" Mask="(###) ###-####" Width="88.5%" Text='<%#Eval("OfficeFax")%>' DisabledStyle-BackColor="#E5E5E5">
</telerik:RadMaskedTextBox>
<%--<asp:TextBox runat="server" ID="TxtOffFax" Text='<%#Eval("OfficeFax")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>--%>
</td>
</tr>
<tr>
<td align="left" style="border-width:0;">
<asp:Label ID="LblIDTCount" Text="IDT Assigned Count" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtIDTCount" Text='<%#Eval("IDTAssignedCount")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>
</td>
<td align="left" style="border-width:0;">
<asp:Label ID="LblLastDate" Text="Last Visit Date" runat="server" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<telerik:RadDatePicker runat="server" ID="DpLastDate" CssClass="ProviderDtpicker">
<DateInput DateFormat="MM/dd/yyyy">
</DateInput>
</telerik:RadDatePicker>
</td>
<td align="left" style="border-width:0;">
<asp:Label runat="server" ID="LblWaitTime" Text="Avg. Wait Time" CssClass="Label">
</asp:Label>
</td>
<td align="left" style="border-width:0;">
<asp:TextBox runat="server" ID="TxtWaitTime" Text='<%#Eval("AvgWaitTime")%>' Enabled="false" CssClass="ProviderTextbox">
</asp:TextBox>
</td>
</tr>
<tr id="trAddOffice" runat="server">
<td align="left" colspan="6" style="border-width:0;">
<asp:ImageButton ID="AddOfficeRow" runat="server" UseSubmitBehavior="false" ImageUrl="~/Images/AddDiag1.png" OnClick="AddOfficeRow_Click" />
</td>
</tr>
</table>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings >
</ClientSettings>
</telerik:RadGrid>
aspx.cs page
protected void AddOfficeRow_Click(object sender, ImageClickEventArgs e)
{
//int Rno = GridOfficeInfo.Items.Count + 1;
int Rno = GridOfficeInfo.Items.Count + 1;
PopulateGridOfficeInfo(Rno);
}
public void PopulateGridOfficeInfo(int RowNo)
{
//bool[] bBillingAddress = new bool[RowNo - 1];
//bool[] bMeaningfulUse = new bool[RowNo - 1];
string strCbEMRUsed = string.Empty;
string strCbEMRName = string.Empty;
string strcbOfficeInfo = string.Empty;
DataTable dt = new DataTable();
dt.Columns.Add("StreetAddress");//Text='<%#Eval("StreetAddress")%>'
dt.Columns.Add("Suite");//
dt.Columns.Add("City");//
dt.Columns.Add("State");//
dt.Columns.Add("Zip");//
dt.Columns.Add("OfficeContact");//
dt.Columns.Add("OfficeTel_1");//
dt.Columns.Add("OfficeTel_2");//
dt.Columns.Add("OfficeFax");//
dt.Columns.Add("IDTAssignedCount");//
//dt.Columns.Add("LastDate", typeof(DateTime?));
dt.Columns.Add("AvgWaitTime");//
for (int i = 0; i < RowNo; i++)
{
//string lnkOfficeMap = string.Empty;
string StreetAddress = string.Empty;
string Suite = string.Empty;
string City = string.Empty;
string State = string.Empty;
string Zip = string.Empty;
string OfficeContact = string.Empty;
string OfficeTel_1 = string.Empty;
string OfficeTel_2 = string.Empty;
string OfficeFax = string.Empty;
string IDTAssignedCount = string.Empty;
string AvgWaitTime = string.Empty;
if (i < RowNo - RowNo)
{
//bBillingAddress[i] = ((CheckBox)GridOfficeInfo.Items[i].FindControl("ChkBillAdd")).Checked;
//lnkOfficeMap = ((LinkButton)GridOfficeInfo.Items[i].FindControl("Click here for map")).Text;
StreetAddress = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtStreet")).Text;
Suite = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtSuite")).Text;
City = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtCity")).Text;
State = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtState")).Text;
Zip = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtZip")).Text;
OfficeContact = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtContact")).Text;
//bMeaningfulUse[i] = ((CheckBox)GridOfficeInfo.Items[i].FindControl("MeaningUse")).Checked;
OfficeTel_1 = ((RadMaskedTextBox)GridOfficeInfo.Items[i].FindControl("TxtOffTel1")).Text;
//OfficeTel_1 = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtOffTel1")).Text;
OfficeTel_2 = ((RadMaskedTextBox)GridOfficeInfo.Items[i].FindControl("TxtOffTel2")).Text;
//OfficeTel_2 = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtOffTel2")).Text;
OfficeFax = ((RadMaskedTextBox)GridOfficeInfo.Items[i].FindControl("TxtOffFax")).Text;
//OfficeFax = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtOffFax")).Text;
IDTAssignedCount = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtIDTCount")).Text;
AvgWaitTime = ((TextBox)GridOfficeInfo.Items[i].FindControl("TxtWaitTime")).Text;
}
dt.Rows.Add(StreetAddress, Suite, City, State, Zip, OfficeContact, OfficeTel_1, OfficeTel_2, OfficeFax, IDTAssignedCount, AvgWaitTime);
}
GridOfficeInfo.DataSource = dt;
GridOfficeInfo.DataBind();
}
Use the NeedDataSource event to provide a datasource. My best guess is that it no longer has a datasource after a postback: https://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/simple-vs-advanced/defaultcs.aspx. You will see how often you need to provide datasource when you do it manually.
Similar problems can arise if you disable viewstate too.

In grid view i cannot access the control id's from <EmptyDataTemplate> in its .ascx.cs file

wcJobShuffling.ascx
//This is an existing code in which a panel navigation contains a grid view.In its ascx.cs the intellisense is not showing the control id's from EmptyDataTemplate.
<asp:Panel ID="navigationJobs" runat="server">
<table width="98%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="middle" colspan="5" class="tab_not_sltd">
<table cellpadding="0" cellspacing="1" style="width: 100%;">
<tr>
<td style="width: 100%">
<table cellpadding="0" cellspacing="1" style="width: 100%;">
<tr>
<td class="print_row" style="height: 3px">
<a class="blue_nor_lnk" href="#"></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr width="98%" align="center">
<td align="left" valign="middle" width="9%" nowrap>
<asp:ImageButton ID="imgFirstPage" runat="server" align="absmiddle" border="0" SkinID="imgButtonFirst"
OnClick="imgFirstPage_Click" ToolTip="First" CausesValidation="false" />
<asp:ImageButton ID="imgPrevPage" runat="server" align="absmiddle" border="0" SkinID="imgButtonPrev"
OnClick="imgPrevPage_Click" ToolTip="Previous" CausesValidation="false" />
<span class="blue_normal">
<asp:Label ID="lblSPage" runat="server" CssClass=" blue_normal" align="absmiddle"
Width="12px"></asp:Label>
<asp:Label ID="lblto" runat="server" Text="of" CssClass="blue_normal" align="absmiddle"
Width="12px"></asp:Label>
<asp:Label ID="lblEPage" runat="server" CssClass="blue_normal" align="absmiddle"
Width="12px"></asp:Label>
<asp:Label ID="lblof" runat="server" Text="of" CssClass="blue_normal" align="absmiddle"
Visible="false"></asp:Label>
<asp:Label ID="lblTotalRecords" runat="server" CssClass=" blue_normal" align="absmiddle"></asp:Label>
</span>
<asp:ImageButton ID="imgNextPage" runat="server" align="absmiddle" border="0" SkinID="imgButtonNext"
OnClick="imgNextPage_Click" ToolTip="Next" CausesValidation="false" />
<asp:ImageButton ID="imgLastPage" runat="server" align="absmiddle" border="0" SkinID="imgButtonLast"
OnClick="imgLastPage_Click" ToolTip="Last" CausesValidation="false" />
</td>
<td align="left" valign="middle" width="7%" nowrap>
<asp:Label ID="spangoto" runat="server" Text="Go to Page: " CssClass="black_normal"></asp:Label>
<span class="blue_bold">
<asp:DropDownList ID="ddlgoto" runat="server" AutoPostBack="true" CssClass="black_normal"
OnSelectedIndexChanged="ddlgoto_SelectedIndexChanged" Width="40px">
</asp:DropDownList>
</span>
</td>
<td align="left" valign="middle" width="25%" nowrap>
<asp:Label ID="spanRpg" runat="server" Text=" Records Per Page: " CssClass="black_normal"></asp:Label>
<span class="blue_bold">
<asp:DropDownList ID="ddlRows" runat="server" AutoPostBack="true" CssClass="black_normal"
OnSelectedIndexChanged="ddlRows_SelectedIndexChanged" Width="40px">
<asp:ListItem Value="5">5</asp:ListItem>
<asp:ListItem Value="10" Selected="True">10</asp:ListItem>
<asp:ListItem Value="20">20</asp:ListItem>
<asp:ListItem Value="50">50</asp:ListItem>
</asp:DropDownList>
</span>
<asp:Label ID="lblRecords" runat="server" Text="Records found:" CssClass="black_normal"></asp:Label>
<asp:Label ID="lblTotalRecordsFound" runat="server" CssClass="black_bold"></asp:Label>
</td>
<td align="left" valign="middle" style="height: 17px; width: 10%" nowrap>
<asp:HiddenField ID="txtPageNum" runat="server" />
<asp:HiddenField ID="txtTotalpages" runat="server" />
<asp:Label ID="lblpg" CssClass="black_normal" runat="server"
Text="Page" Visible="false"></asp:Label><asp:Label ID="TotalPages" runat="server" Visible="false"></asp:Label><asp:Label ID="lblStatus" runat="server" CssClass="red_lnk"></asp:Label></td>
<td align="right" style="width: 18%">
</td>
</tr>
<tr height="5px" ><td></td></tr>
<tr align="left" style="padding-top: 3px" valign="middle">
<td colspan="5" style="width: 98%" align="left">
<div id="Gridview" width="100%">
<asp:HiddenField ID="hidColor" runat="server" />
<asp:GridView ID="gvJobShuffling" runat="server" AllowPaging="true" AutoGenerateColumns="false"
CellPadding="0" CellSpacing="1" CssClass="grid_bg" GridLines="None" OnRowDataBound="gvJobShuffling_RowDataBound"
OnSelectedIndexChanging="gvJobShuffling_SelectedIndexChanging" PagerStyle-Width="0px"
PageSize="10" ShowFooter="false" Width="100%" OnRowCancelingEdit="gvJobShuffling_RowCancelingEdit"
OnRowEditing="gvJobShuffling_RowEditing" OnRowUpdating="gvJobShuffling_RowUpdating">
<RowStyle CssClass="row_even" />
<PagerStyle CssClass="hide" />
<SelectedRowStyle CssClass="tble_hdr_not_sltd" />
<HeaderStyle CssClass="tble_hdr_not_sltd" />
<EmptyDataRowStyle CssClass="row_odd" HorizontalAlign="Center" />
<FooterStyle CssClass="hide" />
//From Here i am unable to access the control Id's ie...Imtellisense is not showing.
<EmptyDataTemplate>
<table class="confirmation">
<tr>
<td>
<asp:Label Text="Records not found" ID="lblEmpty" runat="server"></asp:Label>
</td>
</tr>
</table>
</EmptyDataTemplate>
<RowStyle CssClass="row_even" />
<AlternatingRowStyle CssClass="row_odd" />
<Columns>
<asp:TemplateField >
<HeaderTemplate>
Form ID
`` </HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblBranchID" runat="server" Text='<%# Bind("BranchID")%>'></asp:Label>
<asp:Label ID="lblProcessID" runat="server" Text='<%# Bind("ProcessID")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblBranchID" runat="server" Text='<%# Bind("BranchID")%>'></asp:Label>
<asp:Label ID="lblProcessID" runat="server" Text='<%# Bind("ProcessID")%>'></asp:Label>
</EditItemTemplate>
<ItemStyle Width="0%" />
<HeaderStyle />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="display: none" valign="middle">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" width="125px">
<a>Bill Number</a>
</td>
<td style="width: 6px">
</td>
</tr>
</table>
</td>
<td id="Img1dsc" align="right" valign="middle">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" width="125px">
<a>Bill Number</a>
</td>
<td style="width: 6px">
</td>
</tr>
</table>
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table width="100%">
<tr>
<td>
<asp:Label ID="lblJobNumber" runat="server" Text='<%# Bind("JobNumber") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<ItemStyle Width="10%" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="Img3asc" align="right" style="display: none" valign="middle">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" width="70%">
<a>Assign To</a>
</td>
<td style="width: 6px">
</td>
</tr>
</table>
</td>
<td id="Img3dsc" align="right" valign="middle">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" width="70%">
<a>Assign To</a>
</td>
<td style="width: 6px">
</td>
</tr>
</table>
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table width="100%">
<tr>
<td>
<%# Eval("AssignedToUserName")%>
</td>
</tr>
</table>
</ItemTemplate>
<ItemStyle Width="10%" />
//Actually in this EditItemTemplate i need to bind the ddlAssignTo.DataSource but this control property is not visible in intellinsense in wcJobsShuffling.ascx.cs
<EditItemTemplate>
<table cellpadding="0" cellspacing="0" border="0" style="padding-left: 3px">
<tr>
<td align="left" valign="middle">
<asp:DropDownList ID="ddlAssignTo" runat="server" OnSelectedIndexChanged="ddlAssignTo_SelectionIndexChanged">
</asp:DropDownList>
</td>
<td align="left" valign="middle" visible="false">
<asp:Label ID="lblSupervisorID" runat="server" Text='<%# Bind("AssignedToUserSupervisorUserID") %>' Visible="false"></asp:Label>
<asp:Label ID="lblJobId" runat="server" Text='<%# Bind("JobID") %>' Visible="false"></asp:Label>
<asp:Label ID="lblAssignedToUserName" runat="server" Text='<%# Bind("AssignedToUserName") %>'
Visible="false"></asp:Label>
</td>
</tr>
</table>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="5%">
<HeaderTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="middle" width="20%">
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table cellpadding="0" cellspacing="0" border="0" style="padding-left: 3px">
<tr>
<td align="right" height="19px" valign="middle">
<asp:ImageButton SkinID="imgButtonEdit" runat="server" ID="imgEdit" ImageAlign="AbsMiddle"
CommandName="Edit" ToolTip="Edit" CausesValidation="false" />
</td>
</tr>
</table>
</ItemTemplate>
<EditItemTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="middle" nowrap>
<asp:ImageButton SkinID="imgButtonUpdate" runat="server" ID="imgUpdate" ImageAlign="AbsMiddle"
CommandName="Update" ValidationGroup="GSave" ToolTip="Update" CausesValidation="false" />
<asp:ImageButton SkinID="imgButtonCancel" runat="server" ID="imgGCancel" ImageAlign="AbsMiddle"
CommandName="Cancel" ToolTip="Cancel" CausesValidation="false" />
</td>
</tr>
</table>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</td>
</tr>
<tr>
<td align="left" valign="middle" width="9%" style="padding-top: 5px">
<asp:ImageButton ID="imgFirstPage1" runat="server" align="absmiddle" border="0" SkinID="imgButtonFirst"
OnClick="imgFirstPage_Click" ToolTip="First" CausesValidation="false" />
<asp:ImageButton ID="imgPrevPage1" runat="server" align="absmiddle" border="0" SkinID="imgButtonPrev"
OnClick="imgPrevPage_Click" ToolTip="Previous" CausesValidation="false" />
<span class="blue_normal">
<asp:Label ID="lblpg1" runat="server" CssClass="blue_normal" align="absmiddle"></asp:Label>
<asp:Label ID="lblSPage1" runat="server" CssClass=" blue_normal" Width="12px" align="absmiddle"></asp:Label>
<asp:Label ID="lblto1" runat="server" Text="of" CssClass="blue_normal" Width="12px"
align="absmiddle"></asp:Label>
<asp:Label ID="lblEPage1" runat="server" CssClass="blue_normal" Width="12px" align="absmiddle"></asp:Label>
<asp:Label ID="lblOf1" runat="server" Text="of" CssClass="blue_normal" Visible="false"
align="absmiddle"></asp:Label>
<asp:Label ID="lblTotPages" runat="server" CssClass=" blue_normal" align="absmiddle"></asp:Label>
</span>
<asp:ImageButton ID="imgNextPage1" runat="server" align="absmiddle" border="0" SkinID="imgButtonNext"
OnClick="imgNextPage_Click" ToolTip="Next" CausesValidation="false" />
<asp:ImageButton ID="imgLastPage1" runat="server" align="absmiddle" border="0" SkinID="imgButtonNext"
OnClick="imgLastPage_Click" ToolTip="Last" CausesValidation="false" />
<asp:HiddenField ID="hidSort" runat="server" />
<asp:HiddenField ID="hidImageSort1" runat="server" />
<asp:HiddenField ID="hidImageSort2" runat="server" />
</td>
</tr>
</table>
</asp:Panel>

I have an error in my listview

these is the problem:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0118: 'System.Web.UI.WebControls.SqlDataSource' is a 'type' but is used like a 'variable'
Source Error:
Line 31:
Line 32:
Line 33: " runat="server"
Line 35: DataSourceID="SqlDataSource1"
This is my codes:
<asp:ListView ID="ListView1" GroupItemCount="3" DataKeyNames="pic_id"
DataSource="<%# SqlDataSource %>" runat="server"
DataSourceID="SqlDataSource1"
onselectedindexchanged="ListView1_SelectedIndexChanged">
<AlternatingItemTemplate>
<td runat="server" style="background-color: #FFFFFF;color: #284775;">
pic_id:
<asp:Label ID="pic_idLabel" runat="server" Text='<%# Eval("pic_id") %>' />
<br />
picture_tag:
<asp:Label ID="picture_tagLabel" runat="server"
Text='<%# Eval("picture_tag") %>' />
<br />
pic:
<asp:Label ID="picLabel" runat="server" Text='<%# Eval("pic") %>' />
<br />
</td>
</AlternatingItemTemplate>
<EmptyDataTemplate>
<table runat="server"
style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
<tr>
<td>
No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<td runat="server" style="">
picture_tag:
<asp:TextBox ID="picture_tagTextBox" runat="server"
Text='<%# Bind("picture_tag") %>' />
<br />
pic:
<asp:TextBox ID="picTextBox" runat="server" Text='<%# Bind("pic") %>' />
<br />
<asp:Button ID="InsertButton" runat="server" CommandName="Insert"
Text="Insert" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Clear" />
<br />
</td>
</InsertItemTemplate>
<LayoutTemplate>
<table runat="server">
<tr runat="server">
<td runat="server">
<table ID="groupPlaceholderContainer" runat="server" border="1"
style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
<tr ID="groupPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
<tr runat="server">
<td runat="server"
style="text-align: center;background-color: #5D7B9D;font-family: Verdana, Arial, Helvetica, sans-serif;color: #FFFFFF">
<asp:DataPager ID="DataPager1" runat="server" PageSize="12">
<Fields>
<asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True"
ShowLastPageButton="True" />
</Fields>
</asp:DataPager>
</td>
</tr>
</table>
</LayoutTemplate>
<EditItemTemplate>
<td runat="server" style="background-color: #999999;">
pic_id:
<asp:Label ID="pic_idLabel1" runat="server" Text='<%# Eval("pic_id") %>' />
<br />
picture_tag:
<asp:TextBox ID="picture_tagTextBox" runat="server"
Text='<%# Bind("picture_tag") %>' />
<br />
pic:
<asp:TextBox ID="picTextBox" runat="server" Text='<%# Bind("pic") %>' />
<br />
<asp:Button ID="UpdateButton" runat="server" CommandName="Update"
Text="Update" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Cancel" />
<br />
</td>
</EditItemTemplate>
<GroupTemplate>
<tr ID="itemPlaceholderContainer" runat="server">
<td ID="itemPlaceholder" runat="server">
</td>
</tr>
</GroupTemplate>
<EmptyItemTemplate>
<td runat="server" />
</EmptyItemTemplate>
<ItemTemplate>
<td runat="server" style="background-color: #E0FFFF;color: #333333;">
pic_id:
<asp:Label ID="pic_idLabel" runat="server" Text='<%# Eval("pic_id") %>' />
<br />
picture_tag:
<asp:Label ID="picture_tagLabel" runat="server"
Text='<%# Eval("picture_tag") %>' />
<br />
pic:
<asp:Label ID="picLabel" runat="server" Text='<%# Eval("pic") %>' />
<br />
</td>
</ItemTemplate>
<SelectedItemTemplate>
<td runat="server"
style="background-color: #E2DED6;font-weight: bold;color: #333333;">
pic_id:
<asp:Label ID="pic_idLabel" runat="server" Text='<%# Eval("pic_id") %>' />
<br />
picture_tag:
<asp:Label ID="picture_tagLabel" runat="server"
Text='<%# Eval("picture_tag") %>' />
<br />
pic:
<asp:Label ID="picLabel" runat="server" Text='<%# Eval("pic") %>' />
<br />
</td>
</SelectedItemTemplate>
</asp:ListView>
Remove DataSource="<%# SqlDataSource %>"
from the ListView definition
If you have bind listview from back end than you can't add Datasource on front size...

how to populate Textbox on Calendar selection changed

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div style="text-align:center">
<asp:Calendar ID="myCal" runat="server" Height="600px" width="900px"
BorderColor="#F2F3F4" BorderWidth="3px" DayStyle-BorderWidth="1px"
TodayDayStyle-BackColor="#82CAFF" NextPrevFormat="ShortMonth"
SelectionMode="Day" DayHeaderStyle-Height="30px"
TitleStyle-BackColor="#CBE3F0" TitleStyle-ForeColor="#153E7E"
OtherMonthDayStyle-ForeColor="#B4CFEC" NextPrevStyle-ForeColor="#2554C7"
CssClass="mGrid" onselectionchanged="myCal_SelectionChanged">
<DayHeaderStyle Height="30px" /><TitleStyle Height="50px" />
<DayStyle BorderWidth="1px" HorizontalAlign="Left" VerticalAlign="Top" />
<TodayDayStyle BackColor="#CBE3F0" />
</asp:Calendar>
</div>
<asp:Panel ID="pnlSelect" runat="server" width="200px" Height="200px" >
<table border="0" cellspacing="6" cellpadding="0" style="background-color:white">
<tr>
<td align="right"></td>
<td>
<h2>New Appointment</h2>
</td>
</tr>
<tr>
<td align="right">Start Date:</td>
<td><asp:TextBox ID="TextBoxStart" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td align="right">End Date:</td>
<td><asp:TextBox ID="TextBoxEnd" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td align="right">Name:</td>
<td><asp:TextBox ID="TextBoxName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td align="right"></td>
<td>
<asp:Button ID="ButtonOK" runat="server" OnClick="ButtonOK_Click" Text="OK" />
<asp:Button ID="ButtonCancel" runat="server" Text="Cancel" OnClick="ButtonCancel_Click" />
</td>
</tr>
</table>
</asp:Panel>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="myCal" PopupControlID="pnlSelect"
OkControlID="ButtonOK" CancelControlID="ButtonCancel" Drag="True">
</asp:ModalPopupExtender>
I want to populate the current date in the Popup however the myCal_SelectionChanged event is not firing
How do i achieve this
Please help
your code is worked fine for me .create a new testpage and try again using same code
if it works then.. may be you have a problem in your page designer.cs

Categories