[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

Close a WebForm? SetFocus in a WebForm?

David Laub

2/18/2004 9:48:00 PM

is there a way to
1) programmatically close a Web Form (e.g. the user presses a button, and
the click event calls some close method I can't find) Yes I can do this in
JavaScript, but I'd like to NOT do this in JavaScript
2) programmatically set focus to a specific Web Form Control (e.g. in the
page load event handler, set focus to a specific Textbox) Yes I can do this
in JavaScript, but I'd like to NOT do this in JavaScript


7 Answers

jamesche

2/18/2004 11:51:00 PM

0

David,

HTTP is connectionless. Therefore, if you are going to do this type of
thing, you must do it from client-side code.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
jamesche@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>Reply-To: "David Laub" <dlaub@wheels.com>
>From: "David Laub" <dlaub@wheels.com>
>Subject: Close a WebForm? SetFocus in a WebForm?
>Date: Wed, 18 Feb 2004 15:47:52 -0600
>Lines: 9
>Organization: Wheels, Inc.
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <OGewzjm9DHA.2524@TK2MSFTNGP11.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
>NNTP-Posting-Host: int1.wheels.com 199.181.32.204
>Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.
phx.gbl
>Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:18434
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
>
>is there a way to
>1) programmatically close a Web Form (e.g. the user presses a button, and
>the click event calls some close method I can't find) Yes I can do this in
>JavaScript, but I'd like to NOT do this in JavaScript
>2) programmatically set focus to a specific Web Form Control (e.g. in the
>page load event handler, set focus to a specific Textbox) Yes I can do
this
>in JavaScript, but I'd like to NOT do this in JavaScript
>
>
>

Alvin Bruney

2/21/2004 4:54:00 AM

0

well you can always insert the script into the response object from the
codebehind
something like Response.Write("<script>window.close()</script>");
it is still script but done from the codebehind as opposed to in the page.
The finally analysis is it must be done thru script either thru streaming
the script out or writing script on the client page

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl...
"David Laub" <dlaub@wheels.com> wrote in message
news:OGewzjm9DHA.2524@TK2MSFTNGP11.phx.gbl...
> is there a way to
> 1) programmatically close a Web Form (e.g. the user presses a button, and
> the click event calls some close method I can't find) Yes I can do this
in
> JavaScript, but I'd like to NOT do this in JavaScript
> 2) programmatically set focus to a specific Web Form Control (e.g. in the
> page load event handler, set focus to a specific Textbox) Yes I can do
this
> in JavaScript, but I'd like to NOT do this in JavaScript
>
>


S'pion

8/16/2009 9:45:00 PM

0

Denis Beauregard a ?crit :
> Le Sun, 16 Aug 2009 11:59:31 -0400, "HREF=\"item.php?item_id=1927\""
> <napas@napa.com> ?crivait dans soc.culture.quebec:
>
>> C'te temp?rature pour les reptiles ?
>
> M'enfin, on attendait cela depuis le d?but de l'?t? !
>
>
> Denis, au fond d'un sous-sol bien frais :-) mais qui a tout de
> m?me march? 8,38 km (calcul? au GPS) ce matin !
>




prendre une marche avec son GPS,

trop con ?a.

Denis Beauregard

8/16/2009 9:46:00 PM

0

Le Sun, 16 Aug 2009 17:42:38 -0400, "HREF=\"item.php?item_id=1927\""
<napas@napa.com> ?crivait dans soc.culture.quebec:

>
>"Denis Beauregard" <denis.b-at-francogene.com.invalid@nospam.com.invalid> a
>?crit dans le message de news: c1tg85hu4j4nse18crlvttntc62v77bhdc@4ax.com...
>> Le Sun, 16 Aug 2009 11:59:31 -0400, "HREF=\"item.php?item_id=1927\""
>> <napas@napa.com> ?crivait dans soc.culture.quebec:
>>
>>>C'te temp?rature pour les reptiles ?
>>
>> M'enfin, on attendait cela depuis le d?but de l'?t? !
>>
>>
>> Denis, au fond d'un sous-sol bien frais :-) mais qui a tout de
>> m?me march? 8,38 km (calcul? au GPS) ce matin !
>
>Si t'as mont? et descendu des c?tes, la mesure est mauvaise.

D'apr?s celui qui avait le GPS, cela en tient compte puisqu'on
a aussi l'altitude tout au long du parcours.


Denis

Denis Beauregard

8/16/2009 9:50:00 PM

0

Le Sun, 16 Aug 2009 17:44:54 -0400, S'pion <spion@lavache.com>
?crivait dans soc.culture.quebec:

>Denis Beauregard a ?crit :
>> Le Sun, 16 Aug 2009 11:59:31 -0400, "HREF=\"item.php?item_id=1927\""
>> <napas@napa.com> ?crivait dans soc.culture.quebec:
>>
>>> C'te temp?rature pour les reptiles ?
>>
>> M'enfin, on attendait cela depuis le d?but de l'?t? !
>>
>>
>> Denis, au fond d'un sous-sol bien frais :-) mais qui a tout de
>> m?me march? 8,38 km (calcul? au GPS) ce matin !
>
>prendre une marche avec son GPS,
>
>trop con ?a.

Mais non. Il y a des amateurs de gadgets. ? chacun ses jouets !
D'ailleurs, son GPS ?tait plus petit qu'un cellulaire ou qu'un APN.
D'autres ont un compteur de pas, ce qui donne aussi la distance, mais
je suppose que le GPS est plus pr?cis. J'avais moi-m?me calcul? la
distance avec une carte et cela donnait 9 km en additionnant les bouts
de sentier. Je suppose qu'il y a une erreur d'arrondi ? chaque
segment et que son GPS est plus pr?cis.

Le plus bizarre que j'ai vu, c'est quelqu'un qui envoyait et recevait
des courriels pendant la marche. ? un moment donn?, elle en avait
re?u un d'un ami qu'on avait vu la veille. Alors, elle lui envoyait
nos salutations pendant qu'on marchait ! Mais le gars en question
s'est plaint ensuite qu'elle faisait lire ses messages ? d'autres.


Denis

Chicken

8/17/2009 2:03:00 AM

0


"Denis Beauregard" <denis.b-at-francogene.com.invalid@nospam.com.invalid> a
?crit dans le message de news: levg85t6odr45lpv1l3n8hvduu933j4lc5@4ax.com...
> Le Sun, 16 Aug 2009 17:42:38 -0400, "HREF=\"item.php?item_id=1927\""
> <napas@napa.com> ?crivait dans soc.culture.quebec:
>
>>
>>"Denis Beauregard" <denis.b-at-francogene.com.invalid@nospam.com.invalid>
>>a
>>?crit dans le message de news:
>>c1tg85hu4j4nse18crlvttntc62v77bhdc@4ax.com...
>>> Le Sun, 16 Aug 2009 11:59:31 -0400, "HREF=\"item.php?item_id=1927\""
>>> <napas@napa.com> ?crivait dans soc.culture.quebec:
>>>
>>>>C'te temp?rature pour les reptiles ?
>>>
>>> M'enfin, on attendait cela depuis le d?but de l'?t? !
>>>
>>>
>>> Denis, au fond d'un sous-sol bien frais :-) mais qui a tout de
>>> m?me march? 8,38 km (calcul? au GPS) ce matin !
>>
>>Si t'as mont? et descendu des c?tes, la mesure est mauvaise.
>
> D'apr?s celui qui avait le GPS, cela en tient compte puisqu'on
> a aussi l'altitude tout au long du parcours.

?a ne change rien. Le GPS mesure la distance ? vol d'oiseau.


Denis Beauregard

8/17/2009 3:05:00 AM

0

Le Sun, 16 Aug 2009 22:02:46 -0400, "HREF=\"item.php?item_id=1927\""
<napas@napa.com> ?crivait dans soc.culture.quebec:

>
>"Denis Beauregard" <denis.b-at-francogene.com.invalid@nospam.com.invalid> a
>?crit dans le message de news: levg85t6odr45lpv1l3n8hvduu933j4lc5@4ax.com...
>> Le Sun, 16 Aug 2009 17:42:38 -0400, "HREF=\"item.php?item_id=1927\""
>> <napas@napa.com> ?crivait dans soc.culture.quebec:
>>
>>>
>>>"Denis Beauregard" <denis.b-at-francogene.com.invalid@nospam.com.invalid>
>>>a
>>>?crit dans le message de news:
>>>c1tg85hu4j4nse18crlvttntc62v77bhdc@4ax.com...
>>>> Le Sun, 16 Aug 2009 11:59:31 -0400, "HREF=\"item.php?item_id=1927\""
>>>> <napas@napa.com> ?crivait dans soc.culture.quebec:
>>>>
>>>>>C'te temp?rature pour les reptiles ?
>>>>
>>>> M'enfin, on attendait cela depuis le d?but de l'?t? !
>>>>
>>>>
>>>> Denis, au fond d'un sous-sol bien frais :-) mais qui a tout de
>>>> m?me march? 8,38 km (calcul? au GPS) ce matin !
>>>
>>>Si t'as mont? et descendu des c?tes, la mesure est mauvaise.
>>
>> D'apr?s celui qui avait le GPS, cela en tient compte puisqu'on
>> a aussi l'altitude tout au long du parcours.
>
>?a ne change rien. Le GPS mesure la distance ? vol d'oiseau.

On a tourn? en rond. La distance ? vol d'oiseau ?tait de moins de
500 m. S'il a mesur? 8,5 km (quand on revenu au point de d?part),
c'est qu'il s'est envol? ? 25000 pieds dans les airs...


Denis