Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 18th, 2006, 03: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, 05: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, 11: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, 01: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, 04: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 29th, 2006, 12:43 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 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, 03: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
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 06:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.