|
Subject:
|
Passing more than one parameters from datagrid
|
|
Posted By:
|
Lyn
|
Post Date:
|
8/18/2006 2:30:37 AM
|
Hi All,
I have created datagrid with hyperlink column and it work fine.My problem is, i want to pass 3 parameters at the same time from the hyperlink column ( i have 3 hyperlink column in my datagrid) to another page.can anybody help me with this?
Thanks!
|
|
Reply By:
|
billmaher
|
Reply Date:
|
8/26/2006 4:54:42 PM
|
How about using a template column add all three values to the same column and making it a hyper link. Sai puli
|
|
Reply By:
|
Lyn
|
Reply Date:
|
8/27/2006 10:29:12 PM
|
Hi Sai Puli, Thanks for your reply.I have converted the column to template column as u said.and coding now look like this
<asp:TemplateColumn HeaderText="link">
<ItemTemplate>
<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.PreBccRefNo") %>' NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.PreBccRefNo")+ "&" + DataBinder.Eval(Container, "DataItem.BccRefNo").ToString()+ "&" + DataBinder.Eval(Container, "DataItem.SufBccRefNo")%>'>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
I have succesfully combined the three column together. My probe now is...i dont know whether the page have pass my value correctly.the link look like this
/BCC.aspx?PreBccRefNo&BccRefNo&PreBccRefNo=R&5&2006
when i check back..the page that suppose to receive the value only define one of the parameter.not all of them[/blue]quote: Originally posted by billmaher
How about using a template column add all three values to the same column and making it a hyper link. Sai puli
|
|
Reply By:
|
Lyn
|
Reply Date:
|
8/28/2006 12:04:15 AM
|
Hi All, I have found useful article on this topic: http://www.tek-tips.com/faqs.cfm?fid=4372
quote: Originally posted by Lyn
Hi Sai Puli, Thanks for your reply.I have converted the column to template column as u said.and coding now look like this
<asp:TemplateColumn HeaderText="link">
<ItemTemplate>
<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.PreBccRefNo") %>' NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.PreBccRefNo")+ "&" + DataBinder.Eval(Container, "DataItem.BccRefNo").ToString()+ "&" + DataBinder.Eval(Container, "DataItem.SufBccRefNo")%>'>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
I have succesfully combined the three column together. My probe now is...i dont know whether the page have pass my value correctly.the link look like this
/BCC.aspx?PreBccRefNo&BccRefNo&PreBccRefNo=R&5&2006
when i check back..the page that suppose to receive the value only define one of the parameter.not all of them[/blue]quote: Originally posted by billmaher
How about using a template column add all three values to the same column and making it a hyper link. Sai puli
|
|
Reply By:
|
hpatel_it
|
Reply Date:
|
8/28/2006 3:47:31 AM
|
Hi Lyn,
You have to define NavigateURL string like below.
bcc.aspx?FirstKey="Your Value"&SecondKey="Your Value"&ThirdKey="Your Value"
and I hope you have a proper knowledge to get Querystring in another page.
Thanks, Hiren Patel
|
|
Reply By:
|
Lyn
|
Reply Date:
|
8/28/2006 11:43:02 PM
|
hi Hiren,
after try and error, i manage to send the parameter but combine all together.the page that suppose to get the value run accordingly (i use query string code to get the value).but still i have to do another thing which is splitting the parameter into 3 value. still working on it.
I'm not satisfied with the way i pass the parameter.because i know your suggestion is the correct way to pass it.but i dont know how.may be u can help me with this?
NavigateUrl='<%# "BCC.aspx?PreBccRefNo=" & DataBinder.Eval(Container, "DataItem.PreBccRefNo")& DataBinder.Eval(Container, "DataItem.BccRefNo").ToString()& DataBinder.Eval(Container, "DataItem.SufBccRefNo")%>
thanks.
quote: Originally posted by hpatel_it
Hi Lyn,
You have to define NavigateURL string like below.
bcc.aspx?FirstKey="Your Value"&SecondKey="Your Value"&ThirdKey="Your Value"
and I hope you have a proper knowledge to get Querystring in another page.
Thanks, Hiren Patel
|
|
Reply By:
|
Lyn
|
Reply Date:
|
8/29/2006 2:30:34 AM
|
solve already...hehehe 
NavigateUrl='<%# "BCC.aspx?PreBccRefNo=" & DataBinder.Eval(Container, "DataItem.PreBccRefNo")& "&BccRefNo=" & DataBinder.Eval(Container, "DataItem.BccRefNo").ToString()& "&SufBccRefNo=" & DataBinder.Eval(Container, "DataItem.SufBccRefNo")%>
quote: Originally posted by Lyn
hi Hiren,
after try and error, i manage to send the parameter but combine all together.the page that suppose to get the value run accordingly (i use query string code to get the value).but still i have to do another thing which is splitting the parameter into 3 value. still working on it.
I'm not satisfied with the way i pass the parameter.because i know your suggestion is the correct way to pass it.but i dont know how.may be u can help me with this?
NavigateUrl='<%# "BCC.aspx?PreBccRefNo=" & DataBinder.Eval(Container, "DataItem.PreBccRefNo")& DataBinder.Eval(Container, "DataItem.BccRefNo").ToString()& DataBinder.Eval(Container, "DataItem.SufBccRefNo")%>
thanks.
quote: Originally posted by hpatel_it
Hi Lyn,
You have to define NavigateURL string like below.
bcc.aspx?FirstKey="Your Value"&SecondKey="Your Value"&ThirdKey="Your Value"
and I hope you have a proper knowledge to get Querystring in another page.
Thanks, Hiren Patel
|