Disable validater controle by code
am 17.04.2008 02:14:10 von John DevlonHi,
Does anyone know how to disable a partical validor by code (vb.net) ?
Thanx
John
Hi,
Does anyone know how to disable a partical validor by code (vb.net) ?
Thanx
John
Sure, just set the Enabled property to false.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
"John Devlon"
news:pDwNj.36525$t05.36335@newsfe09.ams2...
>
> Hi,
>
> Does anyone know how to disable a partical validor by code (vb.net) ?
>
> Thanx
>
> John
>
Hi Nathan,
I can't find the validator by code.... Using "me." doesn't bring up the
validator.... Any suggestions ? Where can I find it?
Thanx
John
"Nathan Sokalski"
news:unkN1WCoIHA.2292@TK2MSFTNGP03.phx.gbl...
> Sure, just set the Enabled property to false.
> --
> Nathan Sokalski
> njsokalski@hotmail.com
> http://www.nathansokalski.com/
>
> "John Devlon"
> news:pDwNj.36525$t05.36335@newsfe09.ams2...
>>
>> Hi,
>>
>> Does anyone know how to disable a partical validor by code (vb.net) ?
>>
>> Thanx
>>
>> John
>>
>
>
Check the *.aspx.designer.vb file to see if it got declared in there. Visual
Studio should have updated that file when you added the Validator, but I've
seen times when it doesn't. If it isn't there, try switching between Design
and Source view, this sometimes adds it. If this still doesn't add it, add
it manually, and the next time Visual Studio does update the
*.aspx.designer.vb file it will replace your manual declaration with the one
it automatically adds (which should be the same). I am going to assume that
the Validator is on the Page, UserControl, or Master Page that you are
writing code for. If the Validator is in a UserControl or Master Page, then
it will not be directly accessible through the code in the *.aspx.vb file
without a few extra steps. Hopefully this helps. If you are still having
trouble, it may be helpful if you post your code.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
"John Devlon"
news:aFxNj.33$Ka7.28@newsfe30.ams2...
> Hi Nathan,
>
> I can't find the validator by code.... Using "me." doesn't bring up the
> validator.... Any suggestions ? Where can I find it?
>
> Thanx
>
> John
>
>
> "Nathan Sokalski"
> news:unkN1WCoIHA.2292@TK2MSFTNGP03.phx.gbl...
>> Sure, just set the Enabled property to false.
>> --
>> Nathan Sokalski
>> njsokalski@hotmail.com
>> http://www.nathansokalski.com/
>>
>> "John Devlon"
>> news:pDwNj.36525$t05.36335@newsfe09.ams2...
>>>
>>> Hi,
>>>
>>> Does anyone know how to disable a partical validor by code (vb.net) ?
>>>
>>> Thanx
>>>
>>> John
>>>
>>
>>
>
>
Hi Nathan,
You where right.... I did it manualy and it works...
Thanx for your feedback
John
"Nathan Sokalski"
news:uFGVIZJoIHA.1772@TK2MSFTNGP03.phx.gbl...
> Check the *.aspx.designer.vb file to see if it got declared in there.
> Visual Studio should have updated that file when you added the Validator,
> but I've seen times when it doesn't. If it isn't there, try switching
> between Design and Source view, this sometimes adds it. If this still
> doesn't add it, add it manually, and the next time Visual Studio does
> update the *.aspx.designer.vb file it will replace your manual declaration
> with the one it automatically adds (which should be the same). I am going
> to assume that the Validator is on the Page, UserControl, or Master Page
> that you are writing code for. If the Validator is in a UserControl or
> Master Page, then it will not be directly accessible through the code in
> the *.aspx.vb file without a few extra steps. Hopefully this helps. If you
> are still having trouble, it may be helpful if you post your code.
> --
> Nathan Sokalski
> njsokalski@hotmail.com
> http://www.nathansokalski.com/
>
> "John Devlon"
> news:aFxNj.33$Ka7.28@newsfe30.ams2...
>> Hi Nathan,
>>
>> I can't find the validator by code.... Using "me." doesn't bring up the
>> validator.... Any suggestions ? Where can I find it?
>>
>> Thanx
>>
>> John
>>
>>
>> "Nathan Sokalski"
>> news:unkN1WCoIHA.2292@TK2MSFTNGP03.phx.gbl...
>>> Sure, just set the Enabled property to false.
>>> --
>>> Nathan Sokalski
>>> njsokalski@hotmail.com
>>> http://www.nathansokalski.com/
>>>
>>> "John Devlon"
>>> news:pDwNj.36525$t05.36335@newsfe09.ams2...
>>>>
>>>> Hi,
>>>>
>>>> Does anyone know how to disable a partical validor by code (vb.net) ?
>>>>
>>>> Thanx
>>>>
>>>> John
>>>>
>>>
>>>
>>
>>
>
>