accessing an asp:label from inside a .dll

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

I'm building a component and I want to access the .Text
property of an asp:label that is on the asp.net page from
a method in my assembly file. Can someone tell me how to
do this? Thanks


Will
 
Hi,

if your class is called when request arrive to the server.

Get the page (the page is the HTTPHandler)
Page s = ((Page)HttpContext.Current.Handler);
Get the lable text
string ss = ((Label)s.FindControl("Label1")).Text;


Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
Back
Top