![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
On an aspx page I am trying to place an image which can be clicked on to download a file. Neither the image or the url of the doc are known until runtime Textbox1.text contains the url of a word document and textbox2.text contains the url of a png graphic Please can someone help me with the syntax as this does not work a href='<%# textbox1.text %>' img src='<%# textbox2.text %>' style="width: 60px; height: 60px" /></a |
#3
| |||
| |||
|
| On an aspx page I am trying to place an image which can be clicked on to download a file. Neither the image or the url of the doc are known until runtime Textbox1.text contains the url of a word document and textbox2.text contains the url of a png graphic Please can someone help me with the syntax as this does not work a href='<%# textbox1.text %>' img src='<%# textbox2.text %>' style="width: 60px; height: 60px" /></a jaez |
#4
| |||
| |||
|
|
You can keep your syntax if you wish, just add runat=server and call DataBind method for the page. Or you can use <%= syntax: a href='<%= textbox1.text %>' Or you can use server controls HyperLink and Image and set their attributes programmatically. -- Eliyahu Goldin, Software Developer Microsoft MVP [ASP.NET] http://msmvps.com/blogs/egoldin http://usableasp.net "Jaez" <jaezms (AT) ntlworld (DOT) com> wrote in message news:HLqOi.780$ah6.751 (AT) newsfe4-win (DOT) ntli.net... On an aspx page I am trying to place an image which can be clicked on to download a file. Neither the image or the url of the doc are known until runtime Textbox1.text contains the url of a word document and textbox2.text contains the url of a png graphic Please can someone help me with the syntax as this does not work a href='<%# textbox1.text %>' img src='<%# textbox2.text %>' style="width: 60px; height: 60px" /></a jaez |
#5
| |||
| |||
|
| On an aspx page I am trying to place an image which can be clicked on to download a file. Neither the image or the url of the doc are known until runtime Textbox1.text contains the url of a word document and textbox2.text contains the url of a png graphic Please can someone help me with the syntax as this does not work a href='<%# textbox1.text %>' img src='<%# textbox2.text %>' style="width: 60px; height: 60px" /></a jaez |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |