I'm facing a peculiar scenario in C# .NET website. I have a TabContainer
containing 7 TabPanels. I am able to write to any of the controls' "Text"
property during Page_Load. But when user enters data into e.g. TextBox or
selects an option from DropDownList, I am unable to readback the value. It
always returns as "". It is not giving the null reference error, but
instead it treats the Text property as blank.
Except from my page:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeFile="UpdateSPPR.aspx.cs" Inherits="UpdateSPPR"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent"
Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent"
Runat="Server">
<div align="center">
<asp:Label ID="lblErrorMsg" runat="server" Font-Size="10"
ForeColor="Red"></asp:Label>
<asp:Label ID="lblSuccessMsg" runat="server" Font-Size="10"
ForeColor="Green"></asp:Label>
</div>
<div style="margin:10px 0;"></div>
<asp:Panel ID="pnlUpdateSPPR" runat="server">
<ajaxToolkit:TabContainer ID="tc1" runat="server"
ActiveTabIndex="0">
<!-- Page 1 -->
<ajaxToolkit:TabPanel ID="tpPage1" runat="server">
<HeaderTemplate>
1. One Page Summary
</HeaderTemplate>
<ContentTemplate>
<asp:Table ID="tblP1" runat="server" Width="100%"
BorderWidth="2px" GridLines="Both" CellPadding="2">
<asp:TableRow ID="tblP1R3" runat="server">
<asp:TableCell ID="tblP1C3_1" runat="server"
ColumnSpan="3">
Project: <asp:Label ID="*lblPage1Project*"
runat="server"></asp:Label>
</asp:TableCell>
<asp:TableCell ID="tblP1C3_2" runat="server"
ColumnSpan="4">
Week: <asp:TextBox ID="*txbPage1Week*"
runat="server" Width="25%"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
In the above, I am able to set lblPage1Project.Text or txbPage1Week.Text in
Page_Load. But in a button click routine, when I want to read back
txbPage1Week.Text, I get "".
I have tried referencing direct as txbPage1Week.Text, even thru
FindControlRecursive() as described in
http://msdn.microsoft.com/en-us/library/y81z8326%28v=vs.90%29.aspx#Y2166
Anyone has any ideas?
--
--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net
---
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.