Showing posts with label loadshould. Show all posts
Showing posts with label loadshould. Show all posts

Monday, March 26, 2012

set focus

hi..suppose there is only one textbox in the form and one command
button...
can anyone tell me how can i setfocus of textbox when page is load?
should i do that by java script?please send me coding how to do that?
and can anyone tell me how can i send mail to the group of user?and how
can i add user in the vb.net?
i am developing one web application for one designing institute and
they want mailing facility so if i send one mail then all the member of
institute get that mail and for that i am supposed to create one group
for that...and any member can leave any time and one can be a member
of the institute so no of user are not fixed so tell me how can i do?i
did coding for sending one mail to the single user but i don't know how
to do for the group?should i take one array?please send me the code
snippet and it's better if it's in visual basic and not asp..thanks a
lot in advance
NilIf you are in 2.0, use method SetFocus.
In 1.1 you need to do it in with javascript in the body's onload event.
And it is always a good idea to post different questions in separate
threads.
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"nil" <NileshThakker786@.gmail.com> wrote in message
news:1165315092.234534.218860@.73g2000cwn.googlegroups.com...
> hi..suppose there is only one textbox in the form and one command
> button...
> can anyone tell me how can i setfocus of textbox when page is load?
> should i do that by java script?please send me coding how to do that?
>
> and can anyone tell me how can i send mail to the group of user?and how
> can i add user in the vb.net?
> i am developing one web application for one designing institute and
> they want mailing facility so if i send one mail then all the member of
> institute get that mail and for that i am supposed to create one group
> for that...and any member can leave any time and one can be a member
> of the institute so no of user are not fixed so tell me how can i do?i
> did coding for sending one mail to the single user but i don't know how
> to do for the group?should i take one array?please send me the code
> snippet and it's better if it's in visual basic and not asp..thanks a
> lot in advance
>
> Nil
>
Nil,
Eliyahu is right on. Here's what the javascript would look like if you are
using the 1.1 framework:
<script type='text/javascript'>
textbox = document. getElementById('[Replacewithnameofcontro
l]');
if (textbox)
{
textbox.focus();
}
else
{
// The textbox doesn't exist you have an error
}
</script>
If you are using the 2.0 framework you can do what Eliyahu mentioned or you
could do it this way:
Page.SetFocus(control);
Note: You must call this on or before the PreRender event.
Nick Wegner
"Eliyahu Goldin" wrote:

> If you are in 2.0, use method SetFocus.
> In 1.1 you need to do it in with javascript in the body's onload event.
> And it is always a good idea to post different questions in separate
> threads.
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]
>
> "nil" <NileshThakker786@.gmail.com> wrote in message
> news:1165315092.234534.218860@.73g2000cwn.googlegroups.com...
>
>
Sorry Eliyahu, I meant to say that in 2.0 he could also use control.focus().
Didn't mean to repeat you...
Nick Wegner
"Nick Wegner" wrote:
> Nil,
> Eliyahu is right on. Here's what the javascript would look like if you ar
e
> using the 1.1 framework:
> <script type='text/javascript'>
> textbox = document. getElementById('[Replacewithnameofcontro
l]');
> if (textbox)
> {
> textbox.focus();
> }
> else
> {
> // The textbox doesn't exist you have an error
> }
> </script>
> If you are using the 2.0 framework you can do what Eliyahu mentioned or yo
u
> could do it this way:
> Page.SetFocus(control);
> Note: You must call this on or before the PreRender event.
> --
> Nick Wegner
>
> "Eliyahu Goldin" wrote:
>

set focus

hi..suppose there is only one textbox in the form and one command
button...
can anyone tell me how can i setfocus of textbox when page is load?
should i do that by java script?please send me coding how to do that?

and can anyone tell me how can i send mail to the group of user?and how
can i add user in the vb.net?
i am developing one web application for one designing institute and
they want mailing facility so if i send one mail then all the member of
institute get that mail and for that i am supposed to create one group
for that...and any member can leave any time and one can be a member
of the institute so no of user are not fixed so tell me how can i do?i
did coding for sending one mail to the single user but i don't know how
to do for the group?should i take one array?please send me the code
snippet and it's better if it's in visual basic and not asp..thanks a
lot in advance

NilIf you are in 2.0, use method SetFocus.

In 1.1 you need to do it in with javascript in the body's onload event.

And it is always a good idea to post different questions in separate
threads.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"nil" <NileshThakker786@.gmail.comwrote in message
news:1165315092.234534.218860@.73g2000cwn.googlegro ups.com...

Quote:

Originally Posted by

hi..suppose there is only one textbox in the form and one command
button...
can anyone tell me how can i setfocus of textbox when page is load?
should i do that by java script?please send me coding how to do that?
>
>
and can anyone tell me how can i send mail to the group of user?and how
can i add user in the vb.net?
i am developing one web application for one designing institute and
they want mailing facility so if i send one mail then all the member of
institute get that mail and for that i am supposed to create one group
for that...and any member can leave any time and one can be a member
of the institute so no of user are not fixed so tell me how can i do?i
did coding for sending one mail to the single user but i don't know how
to do for the group?should i take one array?please send me the code
snippet and it's better if it's in visual basic and not asp..thanks a
lot in advance
>
>
>
Nil
>


Sorry Eliyahu, I meant to say that in 2.0 he could also use control.focus().
Didn't mean to repeat you...

--
Nick Wegner

"Nick Wegner" wrote:

Quote:

Originally Posted by

Nil,
>
Eliyahu is right on. Here's what the javascript would look like if you are
using the 1.1 framework:
>
<script type='text/javascript'>
textbox = document.getElementById('[Replacewithnameofcontrol]');
if (textbox)
{
textbox.focus();
}
else
{
// The textbox doesn't exist you have an error
}
</script>
>
If you are using the 2.0 framework you can do what Eliyahu mentioned or you
could do it this way:
>
Page.SetFocus(control);
>
Note: You must call this on or before the PreRender event.
>
--
Nick Wegner
>
>
>
"Eliyahu Goldin" wrote:
>

Quote:

Originally Posted by

If you are in 2.0, use method SetFocus.

In 1.1 you need to do it in with javascript in the body's onload event.

And it is always a good idea to post different questions in separate
threads.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"nil" <NileshThakker786@.gmail.comwrote in message
news:1165315092.234534.218860@.73g2000cwn.googlegro ups.com...

Quote:

Originally Posted by

hi..suppose there is only one textbox in the form and one command
button...
can anyone tell me how can i setfocus of textbox when page is load?
should i do that by java script?please send me coding how to do that?
>
>
and can anyone tell me how can i send mail to the group of user?and how
can i add user in the vb.net?
i am developing one web application for one designing institute and
they want mailing facility so if i send one mail then all the member of
institute get that mail and for that i am supposed to create one group
for that...and any member can leave any time and one can be a member
of the institute so no of user are not fixed so tell me how can i do?i
did coding for sending one mail to the single user but i don't know how
to do for the group?should i take one array?please send me the code
snippet and it's better if it's in visual basic and not asp..thanks a
lot in advance
>
>
>
Nil
>