Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

webform button problem

  Asked By: Anpu    Date: May 09    Category: Asp.net    Views: 753
  

I am using asp .net
I am doing some databse operation on page_load.It is doing properly.
But when I am clicking on serverbased button, then it is giving error
that databse table 'xyz' not found while I am using that database
table in page_load event but I think it is executing that full code
after clicking button.
& still I had not writed any code on that button click.

For that Now I am using HTML button but I don't know how to go to
next page usinfg that button.
So plz help me & tell me what to do for this case.

& tell me how to excute jscript on buttonclick

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Leon Evans     Answered On: May 09

If you do database operations in 'Page-Load', it will
run it everytime you postback , unless you specify "if
Not PostBack'.

Secondly check your connect strings in the function
where you get a 'database not found' error.

You could post relevant pieces of code  and exact error
message.

 
Didn't find what you were looking for? Find more on webform button problem Or get search suggestion and latest updates.




Tagged: