D
David
Hi all,
I have a page that inherits from my own page class that inherits from
system.web.ui.page.
In my page, I have a button click event that saves content of the page. The
saving is actually done via the bubbled event rather than directly in my
page.
Now, if I enter invalid data (for example, 31st February 2007), I need to
stop the event from bubbling and report the error to the user. The page
itself is converting the the date/time...
for example...
private void SaveButton_Click(object sender, eventargs e)
{
MyDate = Convert.ToDateTime(<date/time to convert>);
}
MyDate is then sent up through the bubbling to be saved by my page class.
However, if 31 February 2007 is entered, it fails on that line (which I
expect). I can try/catch the exception and display onto the page, but how do
I stop the event from bubbling upwards and still trying to save an invalid
date (which will still fail)?
Thanks.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
I have a page that inherits from my own page class that inherits from
system.web.ui.page.
In my page, I have a button click event that saves content of the page. The
saving is actually done via the bubbled event rather than directly in my
page.
Now, if I enter invalid data (for example, 31st February 2007), I need to
stop the event from bubbling and report the error to the user. The page
itself is converting the the date/time...
for example...
private void SaveButton_Click(object sender, eventargs e)
{
MyDate = Convert.ToDateTime(<date/time to convert>);
}
MyDate is then sent up through the bubbling to be saved by my page class.
However, if 31 February 2007 is entered, it fails on that line (which I
expect). I can try/catch the exception and display onto the page, but how do
I stop the event from bubbling upwards and still trying to save an invalid
date (which will still fail)?
Thanks.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available