By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,143 Members | 1,855 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,143 IT Pros & Developers. It's quick & easy.

Can I pass Clietside Objects

P: n/a
Hi Guys,
Couple Questions
1. Is there any way that i can pass client Side Objects to Server Side.

2. Can i validate the data of serverside text boxes / combo box in client
side?

If you know the answers please let me know.

Thanks
Murali
Nov 17 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
1. What do you mean by passing? As object, no you cannot. You can set the
values of various HTML elements, and then access them on the server. For
example, if you have hidden input controls, you can set their value client
side, and then retrieve those values on the server after a post.

2. Yes. Use javascript to get access to the HTML element representing the
textbox, and then just do whatever you need to.

"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Guys,
Couple Questions
1. Is there any way that i can pass client Side Objects to Server Side.

2. Can i validate the data of serverside text boxes / combo box in client
side?

If you know the answers please let me know.

Thanks
Murali

Nov 17 '05 #2

P: n/a
Murali:

1. Nope. Thats what makes them "Client Side"
2. Yes, using Javascript and the Form's OnSubmit event. Without knowing more
specifics, thats all I can offer.
--
Elliot M. Rodriguez, MCSD
*** It would take 227 cans of Mountain Dew to kill me***

"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Guys,
Couple Questions
1. Is there any way that i can pass client Side Objects to Server Side.

2. Can i validate the data of serverside text boxes / combo box in client
side?

If you know the answers please let me know.

Thanks
Murali

Nov 17 '05 #3

P: n/a
Q1. I got that. I know that in previous version on you cannot do that. I was
wondoring in .Net can we do it or not.

Q2. I mean to say I have <asp:TextBox id="TextBox1"
runat="server"></asp:TextBox>
How do iget this value in javascript.
I cannot see any object with this name because it runs at server.
Is it possible?

"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
1. What do you mean by passing? As object, no you cannot. You can set the
values of various HTML elements, and then access them on the server. For
example, if you have hidden input controls, you can set their value client
side, and then retrieve those values on the server after a post.

2. Yes. Use javascript to get access to the HTML element representing the
textbox, and then just do whatever you need to.

"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Guys,
Couple Questions
1. Is there any way that i can pass client Side Objects to Server Side.

2. Can i validate the data of serverside text boxes / combo box in client side?

If you know the answers please let me know.

Thanks
Murali


Nov 17 '05 #4

P: n/a
Hi

alert(document.forms[0].TextBox1.value);

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
Q1. I got that. I know that in previous version on you cannot do that. I was wondoring in .Net can we do it or not.

Q2. I mean to say I have <asp:TextBox id="TextBox1"
runat="server"></asp:TextBox>
How do iget this value in javascript.
I cannot see any object with this name because it runs at server.
Is it possible?

"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
1. What do you mean by passing? As object, no you cannot. You can set the
values of various HTML elements, and then access them on the server. For
example, if you have hidden input controls, you can set their value client side, and then retrieve those values on the server after a post.

2. Yes. Use javascript to get access to the HTML element representing the textbox, and then just do whatever you need to.

"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Guys,
Couple Questions
1. Is there any way that i can pass client Side Objects to Server Side.
2. Can i validate the data of serverside text boxes / combo box in

client side?

If you know the answers please let me know.

Thanks
Murali



Nov 17 '05 #5

P: n/a
Thaks for help

What about the events?
Means if it a command button can i write client side click event just like
HTML Controls?

"Vidar Petursson" <th*****@icysoft.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Hi

alert(document.forms[0].TextBox1.value);

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
Q1. I got that. I know that in previous version on you cannot do that. I

was
wondoring in .Net can we do it or not.

Q2. I mean to say I have <asp:TextBox id="TextBox1"
runat="server"></asp:TextBox>
How do iget this value in javascript.
I cannot see any object with this name because it runs at server.
Is it possible?

"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
1. What do you mean by passing? As object, no you cannot. You can set the values of various HTML elements, and then access them on the server. For example, if you have hidden input controls, you can set their value client side, and then retrieve those values on the server after a post.

2. Yes. Use javascript to get access to the HTML element representing the textbox, and then just do whatever you need to.

"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> Hi Guys,
> Couple Questions
> 1. Is there any way that i can pass client Side Objects to Server Side. >
> 2. Can i validate the data of serverside text boxes / combo box in

client
> side?
>
> If you know the answers please let me know.
>
> Thanks
> Murali
>
>



Nov 17 '05 #6

P: n/a
All .NET controls just get evaluated to plain old HTML. Have you looked at
the rendered HTML? Because you will see that an <asp:Textbox> becomes an
<input>, and so on.

Client side functionality has not changed - it is still just the browser
evaluating HTML and javascript. So everything is the same - client side
events, client side properties, everything.

"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:u7**************@tk2msftngp13.phx.gbl...
Thaks for help

What about the events?
Means if it a command button can i write client side click event just like
HTML Controls?

"Vidar Petursson" <th*****@icysoft.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Hi

alert(document.forms[0].TextBox1.value);

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
Q1. I got that. I know that in previous version on you cannot do that.
I
was
wondoring in .Net can we do it or not.

Q2. I mean to say I have <asp:TextBox id="TextBox1"
runat="server"></asp:TextBox>
How do iget this value in javascript.
I cannot see any object with this name because it runs at server.
Is it possible?

"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
> 1. What do you mean by passing? As object, no you cannot. You can
set the
> values of various HTML elements, and then access them on the server. For > example, if you have hidden input controls, you can set their value

client
> side, and then retrieve those values on the server after a post.
>
> 2. Yes. Use javascript to get access to the HTML element

representing the
> textbox, and then just do whatever you need to.
>
> "Murali Inguva" <mi*****@hotmail.com> wrote in message
> news:%2****************@tk2msftngp13.phx.gbl...
> > Hi Guys,
> > Couple Questions
> > 1. Is there any way that i can pass client Side Objects to Server

Side.
> >
> > 2. Can i validate the data of serverside text boxes / combo box in
client
> > side?
> >
> > If you know the answers please let me know.
> >
> > Thanks
> > Murali
> >
> >
>
>



Nov 17 '05 #7

P: n/a
Pefect..
You helped me one more time
thanks a lot
"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
All .NET controls just get evaluated to plain old HTML. Have you looked at
the rendered HTML? Because you will see that an <asp:Textbox> becomes an
<input>, and so on.

Client side functionality has not changed - it is still just the browser
evaluating HTML and javascript. So everything is the same - client side
events, client side properties, everything.

"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:u7**************@tk2msftngp13.phx.gbl...
Thaks for help

What about the events?
Means if it a command button can i write client side click event just like
HTML Controls?

"Vidar Petursson" <th*****@icysoft.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Hi

alert(document.forms[0].TextBox1.value);

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
> Q1. I got that. I know that in previous version on you cannot do that.
I was
> wondoring in .Net can we do it or not.
>
> Q2. I mean to say I have <asp:TextBox id="TextBox1"
> runat="server"></asp:TextBox>
> How do iget this value in javascript.
> I cannot see any object with this name because it runs at server.
> Is it possible?
>
>
>
> "Marina" <zl*******@nospam.hotmail.com> wrote in message
> news:uO**************@TK2MSFTNGP12.phx.gbl...
> > 1. What do you mean by passing? As object, no you cannot. You can set the
> > values of various HTML elements, and then access them on the
server.
For
> > example, if you have hidden input controls, you can set their

value client
> > side, and then retrieve those values on the server after a post.
> >
> > 2. Yes. Use javascript to get access to the HTML element

representing the
> > textbox, and then just do whatever you need to.
> >
> > "Murali Inguva" <mi*****@hotmail.com> wrote in message
> > news:%2****************@tk2msftngp13.phx.gbl...
> > > Hi Guys,
> > > Couple Questions
> > > 1. Is there any way that i can pass client Side Objects to Server Side.
> > >
> > > 2. Can i validate the data of serverside text boxes / combo box in > client
> > > side?
> > >
> > > If you know the answers please let me know.
> > >
> > > Thanks
> > > Murali
> > >
> > >
> >
> >
>
>



Nov 17 '05 #8

P: n/a
Murali

From the code behind page to attach an event (or any other client side
attribute) to the object:

Button1.Attributes.Add("onClick", "javascript:confirm(""Submit form?"");")

--
S. Justin Gengo
Web Developer / Programmer

Free Code Library At:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:u7**************@tk2msftngp13.phx.gbl...
Thaks for help

What about the events?
Means if it a command button can i write client side click event just like
HTML Controls?

"Vidar Petursson" <th*****@icysoft.com> wrote in message
news:uE**************@tk2msftngp13.phx.gbl...
Hi

alert(document.forms[0].TextBox1.value);

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Murali Inguva" <mi*****@hotmail.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
Q1. I got that. I know that in previous version on you cannot do that.
I
was
wondoring in .Net can we do it or not.

Q2. I mean to say I have <asp:TextBox id="TextBox1"
runat="server"></asp:TextBox>
How do iget this value in javascript.
I cannot see any object with this name because it runs at server.
Is it possible?

"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
> 1. What do you mean by passing? As object, no you cannot. You can
set the
> values of various HTML elements, and then access them on the server. For > example, if you have hidden input controls, you can set their value

client
> side, and then retrieve those values on the server after a post.
>
> 2. Yes. Use javascript to get access to the HTML element

representing the
> textbox, and then just do whatever you need to.
>
> "Murali Inguva" <mi*****@hotmail.com> wrote in message
> news:%2****************@tk2msftngp13.phx.gbl...
> > Hi Guys,
> > Couple Questions
> > 1. Is there any way that i can pass client Side Objects to Server

Side.
> >
> > 2. Can i validate the data of serverside text boxes / combo box in
client
> > side?
> >
> > If you know the answers please let me know.
> >
> > Thanks
> > Murali
> >
> >
>
>



Nov 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.