Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 28th, 2008, 06:02 PM
cyberstore05
Guest
 
Posts: n/a
Default How to Bind Two Variables to LinkButton Control

Hi,
I need to bind more than one parameter to a LinkButton's PostBackUrl property using the EVAL() method. I am trying to pass two parameters from one web page to another. The expression I have tried to compose is something like this: PostBackUrl ='<%#"Page1.aspx?PriceSearch=" & Eval("Price") %>'>

The above works for one parameter. Adding a second parameter like this the following does not work:
PostBackUrl ='<%# Eval("Price", "Page1.aspx?PriceSearch={0}") + "&=RangeSearch" _
+ Request.QueryString("Range")%>'>

In effect the two parameters I want to pass are "Price" and "Range".
Any help will be appreciated.


Reply With Quote
  #2 (permalink)  
Old October 31st, 2008, 02:50 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

You shouldn't Eval the whole thing, but only the parts that come from the database. E.g.:

Eval("Column1").ToString() + "Something" + Eval("Column2").ToString()

Hope this helps,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
LinkButton PostBack handler in custom control Ozzy Bongo BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 0 July 24th, 2008 07:55 AM
linkbutton control jake ASP.NET 1.0 and 1.1 Basics 1 December 6th, 2005 02:30 PM
Syntax for bind variables in Pro*C Rhea_Raksha All Other Wrox Books 0 July 12th, 2005 09:22 AM
LinkButton List Control bmains ASP.NET 1.0 and 1.1 Professional 1 February 27th, 2004 09:05 PM
How can I make an bind control that accepts update Franklin66 Beginning VB 6 1 December 10th, 2003 09:04 AM



All times are GMT -4. The time now is 01:07 AM.


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