Re: Question rephrazed - is there a to dynamically alter a Form's Post?
From: Jim Cheshire [MSFT] (jamesche_at_online.microsoft.com)
Date: 07/12/04
- Next message: Sky: "Re: Using custom ControlBuilder to parse deep nested sub controls?"
- Previous message: Ken Cox [Microsoft MVP]: "Re: Except Label no other controls show"
- In reply to: Jordan: "Re: Question rephrazed - is there a to dynamically alter a Form's Post?"
- Next in thread: Harold S: "Re: Question rephrazed - is there a to dynamically alter a Form's Post?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 12 Jul 2004 22:52:53 GMT
Jordan,
A Command Button will always post back when you click it. Which events
fire on the server depends on what you clicked and how your event delegates
are configured. You could easily have one event procedure to handle all of
your button clicks if that's the way you code it.
Perhaps you can post some of the relevant code.
Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
jamesche@online.microsoft.com
This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
>From: "Jordan" <jfritts@learn.colostate.edu>
>References: <#JEb$OEaEHA.3996@TK2MSFTNGP12.phx.gbl>
<kISreiFaEHA.2352@cpmsftngxa06.phx.gbl>
>Subject: Re: Question rephrazed - is there a to dynamically alter a Form's
Post?
>Date: Mon, 12 Jul 2004 16:05:22 -0600
>Lines: 72
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
>Message-ID: <#wx9UxFaEHA.2972@TK2MSFTNGP12.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
>NNTP-Posting-Host: learn51.learn.colostate.edu 129.82.148.55
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
>Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:22119
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
>
>Sorry for the confusion, I'm learning the intracacies of .NET as I go. The
>problem I was thinking about in this post was how could I program Button A
>to post a form, serve the new page with with 5 different dynamically
created
>buttons tied to Command events. Then, each of these Command events would
>fire a single event handler and differentiate based on the Command
>Arguemtns.
>
>To do this, I must post the same form (I only get one form per page) to get
>these Command events to fire. The problem was that each time I clicked one
>of these dynamic buttons, the darn Button A event would fire, even though I
>had the dynamic button event handlers defined in the dynamic creation. (I
>wrote an entire new page to ensure everything was working). This made me
>think there was a 'default' button_click event for a form, so I was trying
>to understand how to get around this, hence my question about how to
control
>'different' posts from the same form.
>
>Hope this helps clear the mud,
>j
>
>
>
>"Jim Cheshire [MSFT]" <jamesche@online.microsoft.com> wrote in message
>news:kISreiFaEHA.2352@cpmsftngxa06.phx.gbl...
>> Hi Jordan,
>>
>> I'm a little confused. The Click event will fire for whatever button is
>> clicked. If you click button A, its click event fires. If you click
>> button B, its click event fires.
>>
>> Jim Cheshire [MSFT]
>> MCP+I, MCSE, MCSD, MCDBA
>> Microsoft Developer Support
>> jamesche@online.microsoft.com
>>
>> This post is provided "AS-IS" with no warranties and confers no rights.
>>
>> --------------------
>> >From: "Jordan" <jfritts@learn.colostate.edu>
>> >Subject: Question rephrazed - is there a to dynamically alter a Form's
>> Post?
>> >Date: Mon, 12 Jul 2004 13:09:23 -0600
>> >Lines: 9
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
>> >Message-ID: <#JEb$OEaEHA.3996@TK2MSFTNGP12.phx.gbl>
>> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
>> >NNTP-Posting-Host: learn51.learn.colostate.edu 129.82.148.55
>> >Path:
>>
>cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
2
>> phx.gbl
>> >Xref: cpmsftngxa06.phx.gbl
>> microsoft.public.dotnet.framework.aspnet.webcontrols:22105
>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
>> >
>> >I have button A and button B on a single form, but button B is hidden
for
>> >now. The user clicks button A which submits the form and returns some
>data.
>> >Now, button B is visible and we want the user to click the button B now.
>> How
>> >can i get this form to fire event button B's click method and not even
>> >evaluate button A's click method?
>> >
>> >Thanks, jordan
>> >
>> >
>> >
>>
>
>
>
- Next message: Sky: "Re: Using custom ControlBuilder to parse deep nested sub controls?"
- Previous message: Ken Cox [Microsoft MVP]: "Re: Except Label no other controls show"
- In reply to: Jordan: "Re: Question rephrazed - is there a to dynamically alter a Form's Post?"
- Next in thread: Harold S: "Re: Question rephrazed - is there a to dynamically alter a Form's Post?"
- Messages sorted by: [ date ] [ thread ]