0

I dont know how to pass value from page.aspx.cs (string url = dr["report_image"].ToString();) to page.aspx ( )

i save image filename (eg:sunset.jpg) to sql database and retrieve it using reader (string url = dr["report_image"].ToString();) and i want to use this url (or filename) to use in the main webpage (aspx). I dont know how to pass this value from ".aspx.cs" to ".aspx"

Any help would be appreciated. thank you

2 Answers 2

2
<asp:Image ID="img" Runat="Server" />

Аnd in the code:

img.ImageUrl = url
Sign up to request clarification or add additional context in comments.

1 Comment

thank you bob, as you see i'd be having many problems, hope you'r always there.. thank you
-1

or you can simply generate Image element in aspx.cs side.

the code below

 Image img = new Image();
 img.ImageUrl = "your string";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.