Click here to Skip to main content
15,924,367 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have link button & want to set postbackurl property of the same dynamically with parameter
eg "~profile/home.aspx?param=4"

for this i have datasource contain two columns
1) ID
2) Redirect path

now i have to concatenate this two column value to form url like the give above

i m trying this

PostBackUrl='<%# Bind("RedirectPath") "?param=" Eval("ID") %>'

but its not working
Posted
Comments
Sergey Alexandrovich Kryukov 15-Oct-12 1:31am    
What are you talking about? Please: platform, language, application type, etc. Put appropriate tags. "To" and "binding" do not tell us anything.
--SA

Please enclose in double Quotes "" instead of character string '' and convert it to string if variable PostBackUrl is another type other than string.

A char can hold a single character only, a character literal is a single character in single quote, i.e. '&' , if we enclose more than 1 character then it will generate error "too many characters in character literal"

Thanks,
 
Share this answer
 
You can do one more things, u can select two column as a single column in sql select query.

SQL
SELECT (ColumnA + ColumnB) AS ColumnZ
FROM Table;


and then bind it with single control
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900