Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP .Net Web Controls
Finding object from ID
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Søren Reinke, post: 4300867"] Hi there I am trying to create the following server control. My control has 3 stages, where it show 1 of 3 images, as parameter is gets 1-3 ID's of validators on the aspx page. States: 1. No required validators, show an empty image 2. One or more validator was invalid, show a red arrow image 3. All validators are valid show green arrow image. (the control just returns '<img src="red.gif" />' My problem is, in the aspx page i have: <cc1:ValidationPicture ID="ValidationPicture1" runat="server" Validator1="cityRequiredFieldValidator" Validator2="cityRegularExpressionValidator"/> My method in the DLL get's called correctly, but how do i get from the ID af a validator 'cityRegularExpressionValidator' to the object ? So i can call 'isValid()' on it ? I tried with: obj=Page.FindControl(ID) and obj=FindControl(ID) Put the first one fails because 'Page' is null/nothing the other one always returns null/nothing. I have tried to google it, but no luck :( How do the validators do it ? The also just get an ID and evaluate the objects content. Please help me, an example would be nice, if does not matter if it is in VB or C# -- Best regards C.T.O. Søren Reinke [URL="http://www.Xray-Mag.com/"]www.Xray-Mag.com/[/URL] - Your free diving magazin on the net. Download it in PDF BALI :: Polluce Wreck: A tale of treasures lost and found. SALT (mini-theme): The Salty Oceans - Survive on Seawater? - Mangroves [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Web Controls
Finding object from ID
Top