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
Chevy Mark Sunderland
NA
188
166.7k
How to insert ID value of current record in GridView?
Apr 12 2012 11:53 AM
Hi there, I hope your appreciated help.
First of all I must say that I am a newbie when it comes to net language.
This is my problem.
How to insert ID value of current record in GridView in the querystring of protected void ImageButton1_Click?.
If you have link for similar task, please give it me.
Can you help me? thank you in advance.
Your help would be very appreciated
Thanks for your time and hints
This is my code:
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("http://mynetpage.com/default.aspx?cks=" + Request.Cookies["name"].Value + "");
}
<asp:SqlDataSource ID="SqlDataSource1" runat="server"....
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" .....
..........
<asp:TemplateField HeaderText="M">
<ItemTemplate>
<asp:ImageButton ID="ImageButton1"
CommandName="Edit" runat="Server"
ImageUrl='<%# Eval("myState").ToString().Equals("validate") ? "/Images/Block.gif":"/Images/Edit.gif" %>'
ToolTip="Edit"
OnClientClick="return confirm('Confirm?.');"
Enabled='<%# Eval("myState").ToString() == "not validate" %>'
onclick="ImageButton1_Click" />
</ItemTemplate>
</asp:TemplateField>
Reply
Answers (
4
)
Cache object
How to add video presentation?