473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to find controls in class library?

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
*** Sent via Developersdex http://www.developersdex.com ***
Apr 20 '06 #1
1 1311
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

Apr 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Alphonse Giambrone | last post by:
I have a web form with 2 user controls on it (UC1 and UC2). Each control has a bound datagrid with textboxes in the footer to add a new row. There are also requiredfieldvalidators in each footer....
3
by: Poewood | last post by:
Okay here are four classes for a pocket pc program: Input, fpositional, ComboBoxArray and TextBoxArray. The "input" class is the form. I use the fpositional class to handle most of the functions...
5
by: Gopal Krish | last post by:
Wondering what's the pros and cons in creating reusable web controls using 1. User Controls 2. C# class that creates the controls programmatically Example, I want to develop a page menu...
10
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a...
3
by: Tom | last post by:
I am writing a Visual basic .Net database application. There are many forms that first let you select and look at a DB record and then when you click a "modify" button you are allowed to change...
5
by: Marc Robitaille | last post by:
Hello, Is there better a way of finding a control on WinForm than to use a recursive method on the controls collection property? I ask this question because I have winforms which have many...
1
by: Fadi.MM | last post by:
Hi Guys, I'm trying to create a library of ASP.NET user controls. What i'm trying to do is to encapsulate all my controls in one library (DLL) and re-using them in other projects. Everything is...
8
by: mark.norgate | last post by:
I've run into a few problems trying to use generics for user controls (classes derived from UserControl). I'm using the Web Application model rather than the Web Site model. The first problem...
7
by: Nemisis | last post by:
Hi everyone, Can anyone tell me if it is possible to pass in a property of an object into a sub, and within that sub, find out the name of the item that was passed along with the property name??...
2
by: tbh | last post by:
hi, hope this cross-post is OK. it's unclear to me whether this question belongs more under vstudio or dotnet... i'm using VS2005 pro and am one co-developer of a web solution that is getting to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.