How to pass a local variable from code behind page to the <TextBox> in aspx page? specifically in the <InsertItemTemplate> section of the page. I could pass to a label fine. thanks
*************************************
************aspx page*****************
<InsertItemTemplate>
<asp:Label id="lblName" Text="Location:" AssociatedControlID="txtName" Runat="server" />
<br />
<asp:TextBox id="txtName" Text='<%#Bind("Name") %>' TextMode="SingleLine" Runat="server" />
</InsertItemTemplate>
************CS codebehind page ************
protected void Page_Load(object sender, EventArgs e)
{
String tMessage = Sec.GetUserName(EDIPI);
lblLogin.Text = tMessage; // I could pass this to the aspx page
txtName.Text = tMessage
}
*************************************
************aspx page*****************
<InsertItemTemplate>
<asp:Label id="lblName" Text="Location:" AssociatedControlID="txtName" Runat="server" />
<br />
<asp:TextBox id="txtName" Text='<%#Bind("Name") %>' TextMode="SingleLine" Runat="server" />
</InsertItemTemplate>
************CS codebehind page ************
protected void Page_Load(object sender, EventArgs e)
{
String tMessage = Sec.GetUserName(EDIPI);
lblLogin.Text = tMessage; // I could pass this to the aspx page
txtName.Text = tMessage
}