Update Panel Issue
-
Hi all, I have the Textbox inside Update Panel like below <td colspan="4" style="border: none;"> <asp:UpdatePanel ID="upnl_PeriodYears" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="txtPeriodFromDate" runat="server" Width="90px" ValidationGroup="LandAcqForm" Text='<%#(((System.Data.DataRowView)Container.DataItem).DataView.Table.Columns.Contains("DBFromDate")? Eval("DBFromDate") : "FromDate") %>'></asp:TextBox> But iam getting the below error CS1061: 'System.Web.UI.Control' does not contain a definition for 'DataItem' and no extension method 'DataItem' accepting a first argument of type 'System.Web.UI.Control' could be found (are you missing a using directive or an assembly reference?) How i assign the value to Textbox which is inside Update Panel??? Regards
-
Hi all, I have the Textbox inside Update Panel like below <td colspan="4" style="border: none;"> <asp:UpdatePanel ID="upnl_PeriodYears" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="txtPeriodFromDate" runat="server" Width="90px" ValidationGroup="LandAcqForm" Text='<%#(((System.Data.DataRowView)Container.DataItem).DataView.Table.Columns.Contains("DBFromDate")? Eval("DBFromDate") : "FromDate") %>'></asp:TextBox> But iam getting the below error CS1061: 'System.Web.UI.Control' does not contain a definition for 'DataItem' and no extension method 'DataItem' accepting a first argument of type 'System.Web.UI.Control' could be found (are you missing a using directive or an assembly reference?) How i assign the value to Textbox which is inside Update Panel??? Regards
I just got these solutions by pasting your error message in Google[^]. CS1061: ‘System.Web.UI.Control’ does not contain a definition for ‘DataItem’ and no extension method ‘DataItem’ accepting a first argument of type ‘System.Web.UI.Control’ could be found[^] http://forums.asp.net/t/1456690.aspx/1[^] BTW put your code in
code block
always.thatraja
**My Tip/Tricks
My Dad had a Heart Attack on this day so don't...
** -
I just got these solutions by pasting your error message in Google[^]. CS1061: ‘System.Web.UI.Control’ does not contain a definition for ‘DataItem’ and no extension method ‘DataItem’ accepting a first argument of type ‘System.Web.UI.Control’ could be found[^] http://forums.asp.net/t/1456690.aspx/1[^] BTW put your code in
code block
always.thatraja
**My Tip/Tricks
My Dad had a Heart Attack on this day so don't...
** -
Cool, god bless Google, gonna get that in mind, just a question... an update panel is used for what? to retrieve data from table and refresh it, in order to keep it updated ? like doing it with AJAX? Thanks!
msqar wrote:
just a question... an update panel is used for what? to retrieve data from table and refresh it, in order to keep it updated ? like doing it with AJAX?
Here you go....simple & explained nicely What is the UpdatePanel in ASP.NET Ajax?[^] BTW you welcome
thatraja
**My Tip/Tricks
My Dad had a Heart Attack on this day so don't...
**