Showing posts with label insert. Show all posts
Showing posts with label insert. Show all posts

Saturday, March 31, 2012

Server side CustomValidator triggers but does not do anything

Hi,

I using server side customvalidator in a FormVIew insert form. It
triggers and regardless of the fact if args.IsValid is true or false
the data get inserted. am I missing something?

Thanks,
Mo1) are you sure it's firing?
2) where is the insert/save code firing?
3) do you have a manual Page.Validate and do you have a if(Page.IsValid)
check before insert?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com

"Mo" <le_mo_mo@.yahoo.com> wrote in message
news:1105736397.574472.172070@.z14g2000cwz.googlegr oups.com...
> Hi,
> I using server side customvalidator in a FormVIew insert form. It
> triggers and regardless of the fact if args.IsValid is true or false
> the data get inserted. am I missing something?
> Thanks,
> Mo
Hi,

Thank you for the reply

1) are you sure it's firing?
Yes, I have veried that if goes through "if,then,else"
2) where is the insert/save code firing?
I am using ASP.Net 2.0 and assigned the "insert" command to the
button in the form. It is the standard insert code generated by Visual
Studio
3) do you have a manual Page.Validate and do you have a if(Page.IsValid)
check before insert?
I do not have this. I am not sure where it goes within the standard
generated code.

Any Ideas is greatly appreciated.

Mo

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
I have the following code
void Button2_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
SqlDataSource1.Insert();
Response.Write(" Valid");
}
else
{
Response.Write(" notValid");
}
}
which does the control and will not insert if value is not valid but if
it is valid value then insert nulls in the database. Somewhere I am
missing the binding between the form and the control

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Server side CustomValidator triggers but does not do anything

Hi,
I using server side customvalidator in a FormVIew insert form. It
triggers and regardless of the fact if args.IsValid is true or false
the data get inserted. am I missing something?
Thanks,
Mo1) are you sure it's firing?
2) where is the insert/save code firing?
3) do you have a manual Page.Validate and do you have a if(Page.IsValid)
check before insert?
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mo" <le_mo_mo@.yahoo.com> wrote in message
news:1105736397.574472.172070@.z14g2000cwz.googlegroups.com...
> Hi,
> I using server side customvalidator in a FormVIew insert form. It
> triggers and regardless of the fact if args.IsValid is true or false
> the data get inserted. am I missing something?
> Thanks,
> Mo
>
Hi,
Thank you for the reply
1) are you sure it's firing?
Yes, I have veried that if goes through "if,then,else"
2) where is the insert/save code firing?
I am using ASP.Net 2.0 and assigned the "insert" command to the
button in the form. It is the standard insert code generated by Visual
Studio
3) do you have a manual Page.Validate and do you have a if(Page.IsValid)
check before insert?
I do not have this. I am not sure where it goes within the standard
generated code.
Any Ideas is greatly appreciated.
Mo
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
I have the following code
void Button2_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
SqlDataSource1.Insert();
Response.Write(" Valid");
}
else
{
Response.Write(" notValid");
}
}
which does the control and will not insert if value is not valid but if
it is valid value then insert nulls in the database. Somewhere I am
missing the binding between the form and the control
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

Server side includes

Most of my web sites use server side includes to insert pieces of HTML design into the top and bottom of a page.

This has always worked fine with dreamweaver but now I am using VS2005 It doesn't seem to open these includes when viewing the site pages and therefore cannot switch to the design view.

Is there a way around this as otherwise I am completely stuck with dreamweaver and I really want to switch over to .net.

David Meagor

http://FreeOnlineSurveys.com

In VS2005, you may useMaster Pages and Content Pages or usercontrols to replace the inclues you used in classic asp.

The master page feature looks useful but with 300 or so classic ASP pages which have yet to be converted this isn't going to be practical.

It's such a shame that MS haven't provided support for server side includes in their editor as macromedia have with dreamweaver - it seems like such a simple feature to implement.

David Meagor

http://freeonlinesurveys.com