Saturday, March 24, 2012
this should be easy...
the DBA gives you a field called txtEntry.
it's an integer field in sql 2000.
make a form that has the txtEntry field and validate that only integers
are passed thru on that
form when you save it.
well, i tried this.
i used the CompareValidator control.
make it to DataTypeCheck to Integer.
it lets thru
9999999999
that is ten 9's.
it shouldn't because an integer's max value is
int
Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 -
1 (2,147,483,647). Storage size is 4 bytes. The SQL-92 synonym for int
is integer
why does it let this pass thru? am i doing something wrong?
then on top of that
if i try to pass
2,147,483,647 it won't work because it has comma's.
there has to be a better way to do this.
help, thx.Purdy,
Use a range validator instead. With it you can set minimum and maximum
values. It won't allow commas either though. If you really need to allow
commas and check the min/max you'll want to use a regular expression
validator.
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<purdy_ra@.yahoo.com> wrote in message
news:1137184901.250491.56470@.g14g2000cwa.googlegroups.com...
> really simple.
> the DBA gives you a field called txtEntry.
> it's an integer field in sql 2000.
> make a form that has the txtEntry field and validate that only integers
> are passed thru on that
> form when you save it.
> well, i tried this.
> i used the CompareValidator control.
> make it to DataTypeCheck to Integer.
> it lets thru
> 9999999999
> that is ten 9's.
> it shouldn't because an integer's max value is
> int
> Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 -
> 1 (2,147,483,647). Storage size is 4 bytes. The SQL-92 synonym for int
> is integer
> why does it let this pass thru? am i doing something wrong?
> then on top of that
> if i try to pass
> 2,147,483,647 it won't work because it has comma's.
> there has to be a better way to do this.
> help, thx.
>
this should be easy...
the DBA gives you a field called txtEntry.
it's an integer field in sql 2000.
make a form that has the txtEntry field and validate that only integers
are passed thru on that
form when you save it.
well, i tried this.
i used the CompareValidator control.
make it to DataTypeCheck to Integer.
it lets thru
9999999999
that is ten 9's.
it shouldn't because an integer's max value is
int
Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 -
1 (2,147,483,647). Storage size is 4 bytes. The SQL-92 synonym for int
is integer
why does it let this pass thru? am i doing something wrong?
then on top of that
if i try to pass
2,147,483,647 it won't work because it has comma's.
there has to be a better way to do this.
help, thx.Purdy,
Use a range validator instead. With it you can set minimum and maximum
values. It won't allow commas either though. If you really need to allow
commas and check the min/max you'll want to use a regular expression
validator.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<purdy_ra@.yahoo.com> wrote in message
news:1137184901.250491.56470@.g14g2000cwa.googlegro ups.com...
> really simple.
> the DBA gives you a field called txtEntry.
> it's an integer field in sql 2000.
> make a form that has the txtEntry field and validate that only integers
> are passed thru on that
> form when you save it.
> well, i tried this.
> i used the CompareValidator control.
> make it to DataTypeCheck to Integer.
> it lets thru
> 9999999999
> that is ten 9's.
> it shouldn't because an integer's max value is
> int
> Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 -
> 1 (2,147,483,647). Storage size is 4 bytes. The SQL-92 synonym for int
> is integer
> why does it let this pass thru? am i doing something wrong?
> then on top of that
> if i try to pass
> 2,147,483,647 it won't work because it has comma's.
> there has to be a better way to do this.
> help, thx.
Tuesday, March 13, 2012
Thread was being aborted
I have a login page, and after i validate a username and password i use a
response.redirect to the default page. The username and password are stored
in an sql db. In the response.redirect i use some session variables to be
added in the query string. However i am getting a "Thread was being
aborted.". Any ideas why this could happen?
Thanks inadvance.hi
You should not include the code "Response.redirect.. " in the code blok
"Try {} catch{}"
Sample:
try
{
//deal with the login logic
}
catch(Exception e)
{
}
Response.redirect("default.aspx");
Thanks a lot, it worked. But out of curiosity, you know why the error was
raised' what goes through the try-catch block that raised that error?
"Solo" <sunsolo@.gmail.com> wrote in message
news:1125819246.425176.236590@.z14g2000cwz.googlegroups.com...
> hi
> You should not include the code "Response.redirect.. " in the code blok
> "Try {} catch{}"
> Sample:
> try
> {
> //deal with the login logic
> }
> catch(Exception e)
> {
> }
> Response.redirect("default.aspx");
>
"Loui Mercieca" <loui@.destiny-creations.com> wrote in message
news:%23p3c7USsFHA.1132@.TK2MSFTNGP10.phx.gbl...
> Thanks a lot, it worked. But out of curiosity, you know why the error was
> raised' what goes through the try-catch block that raised that error?
It's a fairly common "gotcha". If you'd written:
Response.Redirect("default.aspx", false);
you wouldn't have got the error...
Loui,
this is what happens:
"The Response.End method ends the page execution and shifts the execution to
the Application_EndRequest event in the application's event pipeline. The
line of code that follows Response.End is not executed.
This problem occurs in the Response.Redirect and Server.Transfer methods
because both methods call Response.End internally. "
This behavior is by design. You can read about it in
http://support.microsoft.com/default.aspx?scid=kb;[LN];312629
Does this information help you?
Daniel Walzenbach
"Loui Mercieca" <loui@.destiny-creations.com> schrieb im Newsbeitrag
news:OvrjmBSsFHA.3504@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I have a login page, and after i validate a username and password i use a
> response.redirect to the default page. The username and password are
> stored in an sql db. In the response.redirect i use some session variables
> to be added in the query string. However i am getting a "Thread was being
> aborted.". Any ideas why this could happen?
> Thanks inadvance.
>