Click here to Skip to main content
15,888,113 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Question[ask] asp.net and IBM DB2 Pin
ricardo 308-Sep-14 18:10
ricardo 308-Sep-14 18:10 
AnswerRe: [ask] asp.net and IBM DB2 Pin
ZurdoDev9-Sep-14 6:54
professionalZurdoDev9-Sep-14 6:54 
AnswerRe: [ask] asp.net and IBM DB2 Pin
Sibeesh KV29-Sep-14 1:24
professionalSibeesh KV29-Sep-14 1:24 
QuestionBuilding OData Web API on the basis of other OData API instead of Database Pin
LiQuick8-Sep-14 0:01
LiQuick8-Sep-14 0:01 
AnswerRe: Building OData Web API on the basis of other OData API instead of Database Pin
Nathan Minier8-Sep-14 4:54
professionalNathan Minier8-Sep-14 4:54 
GeneralRe: Building OData Web API on the basis of other OData API instead of Database Pin
LiQuick8-Sep-14 9:39
LiQuick8-Sep-14 9:39 
Questiononsubmit event Pin
Ali Al Omairi(Abu AlHassan)7-Sep-14 21:07
professionalAli Al Omairi(Abu AlHassan)7-Sep-14 21:07 
AnswerRe: onsubmit event Pin
jkirkerx8-Sep-14 12:58
professionaljkirkerx8-Sep-14 12:58 
I'll take a stab at this, perhaps I will make some sense here. I think you are confusing a regular HTML page with an asp.net page.

It took me a couple of years to figure out asp.net, and how it handles the submit button.

One of the caveats of asp.net, is that you can only have 1 form tag. So you can't wrap multiple submit buttons with their own form tag, to create multiple default buttons.

Instead asp.net uses a script manager I want to say, I think that is what controls the submit behavior, which in turn writes JavaScript to control form action.

So to create multiple submit buttons, you have to wrap each form area in a container like a panel, and set the default button of that panel to the submit button inside the panel container.

So to answer your question:

On a button control like image button or button
You control the button with

OnClientClick = "run_javascript(); return false;"
Add Handler click Address Of button_click

So you can run JavaScript to validate, run a webservice, and based on what you return, say false, the handler will not fire the button event, or true, the handler will fire the button event.

Now there are ways to control the page submit event, but you have to be more precise as to what you want to do.

In the run_javascript above, you can use JavaScript to reprogram data in text boxes or input elements, that will post back to the server, thus the name input element.
GeneralRe: onsubmit event Pin
Ali Al Omairi(Abu AlHassan)8-Sep-14 21:24
professionalAli Al Omairi(Abu AlHassan)8-Sep-14 21:24 
GeneralRe: onsubmit event Pin
jkirkerx9-Sep-14 4:22
professionaljkirkerx9-Sep-14 4:22 
QuestionSample code to post a asp.net forms data to third party API in XML input Pin
Roberts Techie7-Sep-14 19:07
Roberts Techie7-Sep-14 19:07 
GeneralRe: Sample code to post a asp.net forms data to third party API in XML input Pin
Kornfeld Eliyahu Peter7-Sep-14 20:51
professionalKornfeld Eliyahu Peter7-Sep-14 20:51 
GeneralRe: Sample code to post a asp.net forms data to third party API in XML input Pin
Richard MacCutchan7-Sep-14 21:27
mveRichard MacCutchan7-Sep-14 21:27 
GeneralRe: Sample code to post a asp.net forms data to third party API in XML input Pin
Kornfeld Eliyahu Peter7-Sep-14 21:57
professionalKornfeld Eliyahu Peter7-Sep-14 21:57 
GeneralRe: Sample code to post a asp.net forms data to third party API in XML input Pin
Richard MacCutchan7-Sep-14 22:15
mveRichard MacCutchan7-Sep-14 22:15 
AnswerRe: Sample code to post a asp.net forms data to third party API in XML input Pin
Bernhard Hiller7-Sep-14 22:06
Bernhard Hiller7-Sep-14 22:06 
QuestionHow to implement a Treeview / Form interface. Pin
Wierdbeard656-Sep-14 4:21
Wierdbeard656-Sep-14 4:21 
AnswerRe: How to implement a Treeview / Form interface. Pin
jkirkerx6-Sep-14 12:30
professionaljkirkerx6-Sep-14 12:30 
GeneralRe: How to implement a Treeview / Form interface. Pin
Wierdbeard656-Sep-14 15:21
Wierdbeard656-Sep-14 15:21 
GeneralRe: How to implement a Treeview / Form interface. Pin
jkirkerx6-Sep-14 16:20
professionaljkirkerx6-Sep-14 16:20 
GeneralRe: How to implement a Treeview / Form interface. Pin
Wierdbeard6512-Sep-14 6:54
Wierdbeard6512-Sep-14 6:54 
QuestionNeed to POST xml data to web device w/ c# ASPX Pin
Member 110616635-Sep-14 5:36
Member 110616635-Sep-14 5:36 
QuestionAsp.net GridView with JQuery Pin
Member 106549793-Sep-14 20:41
Member 106549793-Sep-14 20:41 
QuestionRe: Asp.net GridView with JQuery Pin
ZurdoDev5-Sep-14 6:19
professionalZurdoDev5-Sep-14 6:19 
QuestionConverting Word document to HTML page Pin
meeram393-Sep-14 19:14
professionalmeeram393-Sep-14 19:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.