Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8553979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:46:38+00:00 2026-06-11T14:46:38+00:00

hi i have a userControl with this property : public string UserImg { get;

  • 0

hi i have a userControl with this property :

public string UserImg { get; set; }
 protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            userImg.Src = UserImg;
        }
    }

and markup :

<img class="userImg" src="" width="90" id="userImg" runat="server" />

when i use this userControl and set it in code :

StudentDetail1.UserImg = string.Format("AdminPanel/StudentsPic/{0}",query.Pictuer);

(query is my linq to entite’s query that contain image name like ‘person.png’).

image is’not displayed,because i have got an extra “UserControl” below:

<img src="UserControl/AdminPanel/StudentsPic/man.png" id="right_StudentDetail1_userImg" class="userImg" width="90">

how can i remove “UserControl” from src.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:46:40+00:00Added an answer on June 11, 2026 at 2:46 pm

    try using

    StudentDetail1.UserImg = string.Format("../AdminPanel/StudentsPic/{0}",query.Pictuer);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a property on a page called public string productName { get; set;
Lets say i have this usercontrol public class test : UserControl { public int
say I have this control: public partial class bloc999 : UserControl { bloc999Data mainBlock
I have a usercontrol which overrides the property Text. But this property is not
I have UserControl 'A' with a label, and this property: /// <summary> /// Gets
I have a usercontrol bound to a VM. This VM contains a collection property,
I have a UserControl (lets say Foo.ascx) that has a Type public property with
I've created a UserControl with the following public property: [Browsable(true)] public string Text {
I have a UserControl that I've added a Dependency Property to: public partial class
I have made some progress with the DataList and UserControl this morning but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.