LinkButton in GridView
-
Hello Everybody, I have GridView like below: Name CustomerID Send Rakesh 01234 Send In this "Send" is a LinkButton. I need to develope it like when a user click on "Send", page should be redirect to a different page and value of "CustomerID" should go to the redirect page like Querystring. Thanks in Advance Happy Coding
A key to every Solution
-
Hello Everybody, I have GridView like below: Name CustomerID Send Rakesh 01234 Send In this "Send" is a LinkButton. I need to develope it like when a user click on "Send", page should be redirect to a different page and value of "CustomerID" should go to the redirect page like Querystring. Thanks in Advance Happy Coding
A key to every Solution
Set your Link button's PostBackUrl into your redirect Page. Get the CustomerId value By "PreviousPage" object
r_palanivel83 10:01 4 Jan '06
-
Set your Link button's PostBackUrl into your redirect Page. Get the CustomerId value By "PreviousPage" object
r_palanivel83 10:01 4 Jan '06
-
Hello Everybody, I have GridView like below: Name CustomerID Send Rakesh 01234 Send In this "Send" is a LinkButton. I need to develope it like when a user click on "Send", page should be redirect to a different page and value of "CustomerID" should go to the redirect page like Querystring. Thanks in Advance Happy Coding
A key to every Solution
add onclick event for send button and calls a method written in code file in that method just write Response.Redirect("secondpage.aspx?"id) // id is the customerid passed from .aspx page for example (.aspx file) OnClick='<%# GetCommentURL(Eval("ArticleID").ToString()) %>' (.cs file) protected string GetCommentURL(string id) { return "Comments.aspx?id=" + id; }
modified on Tuesday, January 29, 2008 3:01:18 AM
-
Hello Everybody, I have GridView like below: Name CustomerID Send Rakesh 01234 Send In this "Send" is a LinkButton. I need to develope it like when a user click on "Send", page should be redirect to a different page and value of "CustomerID" should go to the redirect page like Querystring. Thanks in Advance Happy Coding
A key to every Solution
why don't you set linkbutton.commandargument = customerid in itemdatabound/rowdatabound eventhandler then set linkbutton.commandname = "send" in property page then add itemcommand/rowcommand eventhandler in this handler add this code
if (e.commandname == "send")
{
DoWhatYouWantToDo(e.commandargument);
}i hope it helps