Message box in asp.net

Shurikn

Regular
Joined
Jul 14, 2004
Messages
62
i've searched the forum for this, but i only fond how to do the message box, not how to retrieve what button the user pressed...

i have an upload button and what i wont to do is if the user try to upload a file that is already there, it ask them if they want to overwrite it. right now it just overwrite it without asking... and is it's possible, if someonme can give me the code in c# code-behind i'd apreaciate ^^
 
There's no way for your C# code to detect which button was clicked.

I'm guessing that you're going to have to use some more javascript to detect which button was pressed, and then somehow pass that value back to your C# code on the server.

Maybe you can have an invisible textbox somewhere, and when when the javascript detects the button, you could put that value into the textbox, and then post the web form. Your C# code could take over from there.

Does anyone else have a better way to do it? Somebody please let me know if I'm way off.

I hope this helps!
 
Back
Top