Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamic button first click doesn't raise event

Reply
Thread Tools

Dynamic button first click doesn't raise event

 
 
William
Guest
Posts: n/a
 
      01-18-2008
Hi

I've created a page with only 'n blank table control on it. When clicking a
button, the table populates with various textboxes and dropdown lists to
make up a complete form. In the last row of the table, a submit button is
added.

Almost everything works fine. The form display, the user fills out the form
and then click Submit. However, the first time the submit button is
clicked, the Click event isn't raised. Just a simple postback is done.
When clicking the submit button again, the code is executed and the captured
results are saved.

I need to get the system to execute the code on the first click to avoid
possible confusion among users.


 
Reply With Quote
 
 
 
 
JIGNESH
Guest
Posts: n/a
 
      01-18-2008
Did you created the button click event handler also at runtime?
eg: Button.Click += .......

Regards
JIGNESH

"William" wrote:

> Hi
>
> I've created a page with only 'n blank table control on it. When clicking a
> button, the table populates with various textboxes and dropdown lists to
> make up a complete form. In the last row of the table, a submit button is
> added.
>
> Almost everything works fine. The form display, the user fills out the form
> and then click Submit. However, the first time the submit button is
> clicked, the Click event isn't raised. Just a simple postback is done.
> When clicking the submit button again, the code is executed and the captured
> results are saved.
>
> I need to get the system to execute the code on the first click to avoid
> possible confusion among users.
>
>
>

 
Reply With Quote
 
 
 
 
William
Guest
Posts: n/a
 
      01-18-2008
Hey

Found the problem.
Needed to assign a value to the btnSubmit.ID.

Thanks


"JIGNESH" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> Did you created the button click event handler also at runtime?
> eg: Button.Click += .......
>
> Regards
> JIGNESH
>
> "William" wrote:
>
>> Hi
>>
>> I've created a page with only 'n blank table control on it. When
>> clicking a
>> button, the table populates with various textboxes and dropdown lists to
>> make up a complete form. In the last row of the table, a submit button
>> is
>> added.
>>
>> Almost everything works fine. The form display, the user fills out the
>> form
>> and then click Submit. However, the first time the submit button is
>> clicked, the Click event isn't raised. Just a simple postback is done.
>> When clicking the submit button again, the code is executed and the
>> captured
>> results are saved.
>>
>> I need to get the system to execute the code on the first click to avoid
>> possible confusion among users.
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Web Controls 0 05-25-2004 01:45 AM



Advertisments