0

I have a column in my database that stores the url of the user's profile picture. In the home page' page_load event handler, I need to determine the image url, but I don't know how to do that using SQL commands.

From the images below, how can I give the query result to the image's ImageUrl property?

enter image description here

enter image description here

1

1 Answer 1

1

You can use Server.mappath("~/profilepicture/profilepicture.jpg")

OdbcDataReader reader=new OdbcDataReader();
reader=command.executereader;
    Profilephotobutton.imageur=server.mappath(" & reader.item(profilepicture) & ");

hope this helps

Sign up to request clarification or add additional context in comments.

1 Comment

its just a datareader you have to execute your sql command in a datareader then you have to get the value ex: odbcdatareader=command.executereader;

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.