How to find controls in class library?

  • Thread starter Thread starter TaeHo Yoo
  • Start date Start date
T

TaeHo Yoo

Hi all,

I have mypage.aspx which contains a hidden field. I need to get the
value of the hidden field in a class library without passing the page
object like

myClassLibrary.GetValue(this) ---> I don't want that

What I want is inside myClassLibrary.GetValue function,
I want to get the page object and find the control and get the value of
it.

Something like

========================================
string myvalue = System.Web.HttpContext.Current..... blah
========================================

Too complicated to explain why I don't want the former method.

Doesn't anyone know how?

Cheers
 
Look at HttpResponse.Form. It has AllKeys array representing a collection of
form variables with values
Hi all,
I have mypage.aspx which contains a hidden field. I need to get the
value of the hidden field in a class library without passing the page
object like
myClassLibrary.GetValue(this) ---> I don't want that
What I want is inside myClassLibrary.GetValue function,
I want to get the page object and find the control and get the value of
it.

Something like

========================================
string myvalue = System.Web.HttpContext.Current..... blah
========================================

Too complicated to explain why I don't want the former method.
Doesn't anyone know how?

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

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

Back
Top