TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohan Chandra
NA
101
16.8k
how we can get hidden field value to update records in DB
Sep 2 2016 5:53 AM
hi, i am using C# ASP.net ,
i have a form where two textboxes to save and then below a grid view where display the records now i want to this hidden field value during update a table records.
<asp:TemplateField HeaderText="From">
<ItemTemplate>
<asp:Label ID="lblfromdt" runat="server" Text='<%# Eval("FromDate", "{0:MMM-yyyy}")%>'></asp:Label>
<asp:HiddenField ID="CustomerId" runat="server" Value='<%# Bind("Id") %>' />
</ItemTemplate>
<ItemStyle CssClass="textAlignCenter" />
<HeaderStyle CssClass="textAlignCenter" />
</asp:TemplateField>
protected void grdFY_SelectedIndexChanged(object sender, EventArgs e)
{
string FromDT = (grdFY.SelectedRow.FindControl("lblfromdt") as Label).Text;
string ToDT = (grdFY.SelectedRow.FindControl("lbltodt") as Label).Text;
txtFinancialYearFrom.Text = FromDT;
txtFinancialYearTo.Text = ToDT;
string s = ((HiddenField)grdFY.SelectedRow.Cells[0].FindControl("CustomerId")).Value;
Id = Convert.ToInt16(s);
}
this Id value i want to pass on button click on same page outside of gridview.
please help me how i can
Reply
Answers (
2
)
how to add any language code in database by admin
C# windows application Datagridview editing