UserControl Property Setting

  • Thread starter MS News \(MS ILM\)
  • Start date
M

MS News \(MS ILM\)

hello all,


I place a usercontrol on my web page, then in code behind I add one
attribute

employee.Attributes.Add("empId", "123")
My usercontrol is not getting this value at all

But:
If I add the attribute directly into my aspx page everything works
<uc1:emp id="employee" runat="server" empid="123" ></uc1:emp>

No errors.

I must be missing something here.

How do I pass or set the values of my usercontrol

Do I need to add the UserControl Dynamically and set its properties..etc..

Thanks for any help

SA
 
J

John Saunders

MS News (MS ILM) said:
hello all,


I place a usercontrol on my web page, then in code behind I add one
attribute

employee.Attributes.Add("empId", "123")
My usercontrol is not getting this value at all

But:
If I add the attribute directly into my aspx page everything works
<uc1:emp id="employee" runat="server" empid="123" ></uc1:emp>

No errors.

I must be missing something here.

How do I pass or set the values of my usercontrol

employee.empid = 123
 
M

MS News \(MS ILM\)

No, for some reason I can not see my employee.empid
I have empid as public in my UserControl but still is not visible from my
aspx page
why??

Thanks
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top