upload control fires on postback

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

upload control fires on postback

Adam Seacrest
I have a form where I have cascading dropdown boxes. The main one must postback to populate the second one. however, this causes the upload control to "upload" nothing and is essentially causes my Identity values to all be even numbers. Is there a way to prevent execution on a postback and only execute when a button is clicked?

Thanks,
Adam
Reply | Threaded
Open this post in threaded view
|

Re: upload control fires on postback

Dean Brettle
Administrator
On Thu, Apr 1, 2010 at 1:51 PM, Adam Seacrest [via Support Forums] <[hidden email]> wrote:
I have a form where I have cascading dropdown boxes. The main one must postback to populate the second one. however, this causes the upload control to "upload" nothing and is essentially causes my Identity values to all be even numbers. Is there a way to prevent execution on a postback and only execute when a button is clicked?
Reply | Threaded
Open this post in threaded view
|

Re: upload control fires on postback

Adam Seacrest
I tried both ways and it still doesnt work.

<Upload:ProgressBar id="inlineProgressBar" runat="server" inline="true" CausesValidation="false"  Width="450px"  Height="40px" Triggers="btnUpload" />

and

 inlineProgressBar.AddTrigger(btnUpload)


any other Ideas/

Thanks,
Adam
Reply | Threaded
Open this post in threaded view
|

Re: upload control fires on postback

Dean Brettle
Administrator
Can you attach a small test project that demonstrates the problem?
Reply | Threaded
Open this post in threaded view
|

Re: upload control fires on postback

Adam Seacrest
I sent you a small app that reproduces the issue

Adam
Reply | Threaded
Open this post in threaded view
|

RE: upload control fires on postback

Adam Seacrest
In reply to this post by Dean Brettle

I ported the upload piece to a new project.  If you run it and start changing the dropdowns, you’ll notice that the identity of the file_data table increments on each postback resulting in non-incremental increases. I know it’s not a major issue but I like my identity columns nice and neat J 

 

Thanks,

Adam

 


From: Dean Brettle [via Support Forums] [mailto:[hidden email]]
Sent: Monday, April 05, 2010 10:38 AM
To: Adam Seacrest
Subject: Re: upload control fires on postback

 

Can you attach a small test project that demonstrates the problem?


View message @ http://n3.nabble.com/upload-control-fires-on-postback-tp691633p697840.html
To unsubscribe from upload control fires on postback, click here.

 

________________________________________________________________________________________________________________________________

Securities offered through Legend Equities Corporation, member FINRA/SIPC
4600 East Park Drive, Ste 300, Palm Beach Gardens, FL 33410; Phone: (561) 694-0110
________________________________________________________________________________________________________________________________

This communication, along with any attachments, should be viewed only by the intended recipient and may contain legally privileged and confidential information belonging to Legend Equities Corporation and its affiliates ('Legend'). If you are not the intended recipient, you are hereby notified that any dissemination, distribution, disclosing of contents to others, or copying of any information contained in or attached to this communication is strictly prohibited. If you received this message in error, you are bound by confidentiality and should notify sender immediately by replying to the sender. Nothing contained herein, or in any attachments, shall be deemed professional advice. It is Legend's policy not to accept email instructions to buy, sell or hold securities or other investments. Email is subject to monitoring, is retained and may be produced to regulatory authorities or others with a legal right to the information. Electronic mail sent over the Internet is not secure and could be intercepted by a third party. For your protection, avoid sending indentifying information, including but not limited to SSN/Account numbers. Legend does not guarantee that this email and any attachments are virus-free and accepts no liability for any damages sustained as a result of viruses. Recipient is responsible for checking and deleting viruses. Legend accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided herein.

TestUpload.zip (2M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: upload control fires on postback

Dean Brettle
Administrator
I see now.  I didn't realize you were using the SqlServerInputFile control.  You could try changing File_CreateBlob to do nothing if the FileName parameter is null or empty.  I don't know SQLServer well enough to say exactly how to do that off-hand.  Please post what you find.