Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Avoiding postback on upload control when another button is clicked

Reply
Thread Tools

Avoiding postback on upload control when another button is clicked

 
 
SBK
Guest
Posts: n/a
 
      09-03-2007
Hi All,

Got a quick problem, hoping someone can help me out here.

Using an Upload Control. If a file to upload is specified and another form
action is committed (i.e. btnBack) then the upload control will still post
the file but not call the event.

Anything I can do to prevent this?


Thanks in advance.




 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      09-03-2007
as the value can be cleared, in client script disable the upload control
via the onclick event of the buttons you don't want to post the file.
the browser will not post disabled fields.

-- bruce (sqlwork.com)




SBK wrote:
> Hi All,
>
> Got a quick problem, hoping someone can help me out here.
>
> Using an Upload Control. If a file to upload is specified and another form
> action is committed (i.e. btnBack) then the upload control will still post
> the file but not call the event.
>
> Anything I can do to prevent this?
>
>
> Thanks in advance.
>
>
>
>

 
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
One button to know which button got clicked? bthumber ASP .Net 4 06-25-2010 05:36 PM
Spring java Controller get correct data from button when "apply"button is clicked but not pressing the <Enter> key albert kao Java 1 04-10-2010 02:54 AM
Avoiding postback on upload control when another button is clicked SBK ASP .Net Web Controls 0 09-03-2007 10:59 AM
Inconsistent behavior of an asp.net button performing a postback when a button is clicked. Mossman ASP .Net 0 12-12-2005 02:55 AM
Adding a second button if the first button is clicked Dave Prout ASP .Net Building Controls 1 06-08-2004 09:15 PM



Advertisments