Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old August 18th, 2006, 02:30 AM
Lyn Lyn is offline
Registered User
 
Join Date: Aug 2006
Location: kuala lumpur, Wilayah persekutuan, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Lyn
Default 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!

  #2 (permalink)  
Old August 26th, 2006, 04:54 PM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How about using a template column add all three values to the same column and making it a hyper link.
Sai puli

  #3 (permalink)  
Old August 27th, 2006, 10:29 PM
Lyn Lyn is offline
Registered User
 
Join Date: Aug 2006
Location: kuala lumpur, Wilayah persekutuan, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Lyn
Default

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

  #4 (permalink)  
Old August 28th, 2006, 12:04 AM
Lyn Lyn is offline
Registered User
 
Join Date: Aug 2006
Location: kuala lumpur, Wilayah persekutuan, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Lyn
Default

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

  #5 (permalink)  
Old August 28th, 2006, 03:47 AM
Registered User
 
Join Date: Aug 2006
Location: Mehsana, Gujarat, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hpatel_it Send a message via Yahoo to hpatel_it
Default

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
  #6 (permalink)  
Old August 28th, 2006, 11:43 PM
Lyn Lyn is offline
Registered User
 
Join Date: Aug 2006
Location: kuala lumpur, Wilayah persekutuan, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Lyn
Default

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
  #7 (permalink)  
Old August 29th, 2006, 02:30 AM
Lyn Lyn is offline
Registered User
 
Join Date: Aug 2006
Location: kuala lumpur, Wilayah persekutuan, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Lyn
Default

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameters fizzerchris Access VBA 5 August 31st, 2007 12:16 PM
Passing parameters ceema Crystal Reports 0 February 15th, 2006 04:03 AM
Passing Parameters spraveens Javascript 5 October 8th, 2003 07:06 AM
passing parameters spraveens Javascript How-To 1 October 8th, 2003 03:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.