Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
How to create TextBox2_TextChanged put into Edit template
Abdalla Elawad
May 14 2017 8:39 AM
330
Reply
Hi Guys
Please help me
This is textbox in EditItem template in gridview :
<EditItemTemplate>
<asp:TextBox ID="TextBox11" Width="80" runat="server" Text='<%# Bind("Service_Start_Date", "{0:dd/MM/yyyy}") %>' TargetControlID="TextBox11"></asp:TextBox>
<ajaxToolkit:CalendarExtender ID="CalendarExtender1" TargetControlID="TextBox11" runat="server" Format="dd/MM/yyyy" />
</EditItemTemplate>
and this is other :
<EditItemTemplate>
<asp:TextBox ID="TextBox11" Width="80" runat="server" Text='<%# Bind("Service_Start_Date", "{0:dd/MM/yyyy}") %>' TargetControlID="TextBox12"></asp:TextBox>
<ajaxToolkit:CalendarExtender ID="CalendarExtender1" TargetControlID="TextBox11" runat="server" Format="dd/MM/yyyy" />
</EditItemTemplate>
How to applied this code and how declare txt in gridview
protected void TextBox11_TextChanged(object sender, EventArgs e)
{
string date = TextBox11.Text;
DateTime dt1 = DateTime.ParseExact(date, "dd/MM/yyyy", CultureInfo.InvariantCulture);
TextBox12.Text = dt1.AddDays(30).ToString("dd/MM/yyyy");
Label1.BackColor = Color.Green;
Label2.Text = ("Team Should Be Changed On:" + dt1.AddDays(30).ToShortDateString());
}
thanks
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
multithreading ping application in c# windows form
how to display one GridViewdata to anothr Grideview in c#