Hello guys,
I'm a newbie to asp.net....I've recently designed a website in which I've taken a gridview control and added a button in the itemtemplate field of the gridview........What I want is that if anyone clicks on this button then the data in the particular row of the gridview comes for the download to user (like open,save etc.).....please make your response as soon as possible.
Thanks in advance.
KushMishra
38
Senior Technical Lead
Recommended Answers
Jump to Postso wot's the problem...
on click event set PostBackUrl = "Download Link depend on id"try that and let me know the o/p
Jump to PostYou can't use button events. You need to handle the events of GridView control. Read MSDN pages or reference book about "GridView Events".
Jump to PostYou must have to read these articles:
1. http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview_events.aspx
2. http://www.codeproject.com/KB/aspnet/GridViewEventHandling.aspx
3.
Jump to PostDo not use LinkButton, use Hyperlink.
<asp:HyperLink ID="link1" runat="server" NavigateUrl='<%# Eval("url","~/{0}") %>' > Show </asp:HyperLink>
protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["KMCon"].ToString()); SqlDataAdapter da = new SqlDataAdapter("select PicID,PicName,PicCategory,PicUrl from Pics order by PicName", con); DataSet ds = …
All 14 Replies
dnanetwork
18
Practically a Master Poster
Banned
KushMishra
38
Senior Technical Lead
kvprajapati
1,826
Posting Genius
Team Colleague
KushMishra
38
Senior Technical Lead
kvprajapati
1,826
Posting Genius
Team Colleague
KushMishra
38
Senior Technical Lead
kvprajapati
1,826
Posting Genius
Team Colleague
KushMishra
38
Senior Technical Lead
kvprajapati
1,826
Posting Genius
Team Colleague
kvprajapati
1,826
Posting Genius
Team Colleague
KushMishra
38
Senior Technical Lead
kvprajapati
1,826
Posting Genius
Team Colleague
KushMishra
commented:
You're a genius bro.....
+1
KushMishra
38
Senior Technical Lead
dnanetwork
18
Practically a Master Poster
Banned
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.