Re: Question: maintaining focus between pages
From: Mike Newton (MNewton_at_discussions.microsoft.com)
Date: 08/06/04
- Next message: Scott Allen: "Re: Safe multithreading in ASP.Net"
- Previous message: who be dat?: "Re: Safe multithreading in ASP.Net"
- In reply to: Mike: "Re: Question: maintaining focus between pages"
- Next in thread: Brad Quinn: "RE: Question: maintaining focus between pages"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 06 Aug 2004 15:54:23 -0500
No, there isn't a way to do it with the framework.
Use Page.RegisterClientScriptBlock to place the javascript in the page,
technically you're still writing it on the server. :-) Use the ID's as
references, since they are the same on the client side as they are on
the server side.
As for a pointer for info, use msdn. http://msdn.microsoft.com/library
is a good place to start. Under the Web Development tree....
Web Development->HTML and Dynamic HTML->SDK Documentation->Reference
will have everything that you basically need. There's an overview of
all things that appear in the HTML DOM, all properties, methods, and
yada. There is also some example scripting, but javascript is very
similar to typical server-side programming.
Mike wrote:
> Figured as much. This particular app. is for external users, but is a
> management app. (not many users), not the main customer-facing application.
> Basically there was an edict of "client code only when necessary" -- and
> also laziness on my part. But basically, you're right.
> So, any pointers to the preferred way to do this? (Figured there'd be a
> declaritive way to do this and have the framework handle it, even if it
> generated client scripting - but maybe not.)
>
> thanks
>
> "Raterus" <moc.liamtoh@suretar.reverse> wrote in message
> news:ueZCgC$eEHA.3632@TK2MSFTNGP09.phx.gbl...
> Not to question you as I'm sure you have a good reason, but why are you
> trying to avoid client-side code in this situation? Doesn't this problem
> beg for it?
>
> To answer your question, no, you can't maintain scroll/focus w/o writing
> client-side code. Sure you can write code to do it on the server, but it is
> still going to be clientside code. I'd try to avoid the postback as much as
> possible, unless this is an intranet app and nobody will ever notice.
>
> --Michael
>
> "Mike" <vimakefile@yahoo.com> wrote in message
> news:e$EEF0%23eEHA.2848@TK2MSFTNGP10.phx.gbl...
>
>>I have a few textbox controls that have autopostback so that when they
>
> loose
>
>>focus they update a label control that shows the count of characters in
>>their respective text control. This works fine, except that after the
>>postback, the page is shown reset -- scrolled to the top and with no
>
> control
>
>>having focus. Can I maintain scroll/focus w/o writing client-side
>>scripting?
>>
>>thanks
>>
>>
>
>
>
- Next message: Scott Allen: "Re: Safe multithreading in ASP.Net"
- Previous message: who be dat?: "Re: Safe multithreading in ASP.Net"
- In reply to: Mike: "Re: Question: maintaining focus between pages"
- Next in thread: Brad Quinn: "RE: Question: maintaining focus between pages"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|