 |
| ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 18th, 2006, 02:30 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Passing more than one parameters from datagrid
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!
|
|

August 26th, 2006, 04:54 PM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How about using a template column add all three values to the same column and making it a hyper link.
Sai puli
|
|

August 27th, 2006, 10:29 PM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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:
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
|
|
|

August 28th, 2006, 12:04 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi All,
I have found useful article on this topic:
http://www.tek-tips.com/faqs.cfm?fid=4372
Quote:
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:
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
|
|
|
|

August 28th, 2006, 03:47 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

August 28th, 2006, 11:43 PM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.:D
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:
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
|
|
|

August 29th, 2006, 02:30 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
solve already...hehehe :D
NavigateUrl='<%# "BCC.aspx?PreBccRefNo=" & DataBinder.Eval(Container, "DataItem.PreBccRefNo")& "&BccRefNo=" & DataBinder.Eval(Container, "DataItem.BccRefNo").ToString()& "&SufBccRefNo=" & DataBinder.Eval(Container, "DataItem.SufBccRefNo")%>
Quote:
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.:D
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:
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
|
|
|
|
 |