473,657 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I pass Clietside Objects

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
8 2023
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*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.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
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*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.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
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*******@nosp am.hotmail.com> wrote in message
news:uO******** ******@TK2MSFTN GP12.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*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.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
Hi

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

--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"Murali Inguva" <mi*****@hotmai l.com> wrote in message
news:ev******** ******@tk2msftn gp13.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*******@nosp am.hotmail.com> wrote in message
news:uO******** ******@TK2MSFTN GP12.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*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.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
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*****@icysof t.com> wrote in message
news:uE******** ******@tk2msftn gp13.phx.gbl...
Hi

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

--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"Murali Inguva" <mi*****@hotmai l.com> wrote in message
news:ev******** ******@tk2msftn gp13.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*******@nosp am.hotmail.com> wrote in message
news:uO******** ******@TK2MSFTN GP12.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*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.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
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*****@hotmai l.com> wrote in message
news:u7******** ******@tk2msftn gp13.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*****@icysof t.com> wrote in message
news:uE******** ******@tk2msftn gp13.phx.gbl...
Hi

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

--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"Murali Inguva" <mi*****@hotmai l.com> wrote in message
news:ev******** ******@tk2msftn gp13.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*******@nosp am.hotmail.com> wrote in message
news:uO******** ******@TK2MSFTN GP12.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*****@hotmai l.com> wrote in message
> news:%2******** ********@tk2msf tngp13.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
Pefect..
You helped me one more time
thanks a lot
"Marina" <zl*******@nosp am.hotmail.com> wrote in message
news:O0******** ******@tk2msftn gp13.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*****@hotmai l.com> wrote in message
news:u7******** ******@tk2msftn gp13.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*****@icysof t.com> wrote in message
news:uE******** ******@tk2msftn gp13.phx.gbl...
Hi

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

--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"Murali Inguva" <mi*****@hotmai l.com> wrote in message
news:ev******** ******@tk2msftn gp13.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*******@nosp am.hotmail.com> wrote in message
> news:uO******** ******@TK2MSFTN GP12.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*****@hotmai l.com> wrote in message
> > news:%2******** ********@tk2msf tngp13.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
Murali

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

Button1.Attribu tes.Add("onClic k", "javascript:con firm(""Submit form?"");")

--
S. Justin Gengo
Web Developer / Programmer

Free Code Library At:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Murali Inguva" <mi*****@hotmai l.com> wrote in message
news:u7******** ******@tk2msftn gp13.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*****@icysof t.com> wrote in message
news:uE******** ******@tk2msftn gp13.phx.gbl...
Hi

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

--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"Murali Inguva" <mi*****@hotmai l.com> wrote in message
news:ev******** ******@tk2msftn gp13.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*******@nosp am.hotmail.com> wrote in message
news:uO******** ******@TK2MSFTN GP12.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*****@hotmai l.com> wrote in message
> news:%2******** ********@tk2msf tngp13.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2842
by: lawrence | last post by:
The following class method is being rejected by the PHP parser. If I change the method paramaters and allow the objects to be passed as copies, then the parser has no problem. Or, if I pass by reference but set no default value, then the parser has no problems. I've resovled this for now by taking out the "false" default values. But how shall I handle those situations (there are many) where I wish to pass an object by reference but I'm not...
4
11581
by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have a funciton inVB DLL Function BuildSqlWhereFromHTML(ByRef AspReq As ASPTypeLibrary.Request, _ ByRef AspSes As ASPTypeLibrary.Session) As String
6
2048
by: Walter | last post by:
Hi, The user has to type his name into input a input field (type = text). This name must be passed to another ASP file. I did this but nothing happened: <form id=ins method="post" onsubmit="return doit()"> Type your name:<input id=txt1 type="text"> <INPUT id=smt TYPE="submit"> </form>
1
4168
by: Andrés Giraldo | last post by:
Hi! I'm trying to pass trough all the objects of a form but I have some text inputs in a DIV and I have many DIVs like this on my form. I'm doing something like: for (i = 0; i < document.forms(0).item.length; i++) { dosomethingwith(document.forms(0).item(i)); }
11
8799
by: Vanessa | last post by:
Hi, I would like to know whether there's any way for me to pass an object by reference to another form? Regards Vanessa
110
9899
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object must be an object instead of
38
4613
by: Radde | last post by:
HI all, Whats the difference b/w pass by ref and pass by pointer in C++ when ur passing objects as args.. Cheers..
7
21612
by: Zlatko Matiæ | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the server ? Is it possible to use parameters in pass-through queries ? An additional question: Is it possible to connect to a database on MySQL or PostgreSQL using ADO ? Is it possible to execute pass-through queries with parameters, using ADO...
2
4710
by: Mountain Bikn' Guy | last post by:
It is known that one cannot pass arguments as ref or out in a marshal-by-reference class. My problem is that I have a C DLL (and C# wrapper) that I need to isolate in an AppDomain and then I need to interact with many objects in that DLL and wrapper by reference. (So the classes inherit from MBRO.) While my app is running, I need to obtain info from objects in the 2nd app domain frequently/speedily and I need update the GUI; and I need to...
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.