Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.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 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
 
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.


 
Old October 31st, 2008, 02:50 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.





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





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