datagrid template columns

C

cgia

So far I have used an hyperlink column in a datagrid to transfer to
another aspx form, using one querystring parameter.

Now I want to keep using that hyperlink, but would like to send 6
parameters through the querystring associated to the link. I see it is
possible to do it with template columns, but how? In visual studio I
cannot understand what are the template properties. Where do I find
related documentation and examples????

Thanks
 
G

Guest

Hi

Using Template Column
===============
This example shows how you can use multiple value in querystring, Field1, Field2 are database field for fld1, fld2 repectively and fld3 is hardcoded to A.

<a href='page2.aspx?fld1=<%#DataBinder.Eval("Field1")%>&fld2=<%#DataBinder.Eval("Field2")%>&fld3=A'></a>

Using HyperLink Column
===============
You can use hyperlink column also, but you have put some code in ItemDataBound event of the datagrid and get the reference to the hyperlink column and dataitem of the datagriditemrow and modify the url as per your querystring.

Thanks & Regards
Raja Balaji R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top