473,569 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

client-side vs server-side

hey all,

i'm having trouble understanding the connection (if there is one beween)
client-side scripting and server side scripting. For example can a variable
that is defined in the code-behind be accessed by client-side code, vice
versa? Any other tips related to the subject is welcomed as well.

thanks,
rodchar
Nov 19 '05 #1
3 1319
> i'm having trouble understanding the connection (if there is one beween)
client-side scripting and server side scripting.
There really isn't a connection.
For example can a variable
that is defined in the code-behind be accessed by client-side code
The server side code can write something to to the page that the javascript
can then read. HTML has to be the 'middle man' for that, though. You can't
directly read a server-side variable from javascript on the client side.
vice
versa?


Vice Versa is harder, since javascript can't actually change the markup that
the server sees. You can have the javascript postback with a querystring, or
have javascript write to a form field, and then grab the form field value on
postback.

Just remember that there is a rendered page in the middle.

javascript <--> CLIENT COMPUTER <--> rendered html page <-->SERVER <-->
Codebehind

-Darrel
Nov 19 '05 #2
The server side code can write something to to the page that the javascript can then read. HTML has to be the 'middle man' for that, though. You can't
directly read a server-side variable from javascript on the client side.


More specifically, the server side code could actually write the javascript:

function sampleJavascrip tFunction(This) {
var el = <%=yourDotNetVa riable%>;
}

-Darrel
Nov 19 '05 #3
Normally no, but you could create an http request in javascript, receive the
request server side with c#, pass back some data then interpret it with
javascript. Look up ajax if you are interested in this. It is a way to
call server side code from javascript.
"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:08******** *************** ***********@mic rosoft.com...
hey all,

i'm having trouble understanding the connection (if there is one beween)
client-side scripting and server side scripting. For example can a
variable
that is defined in the code-behind be accessed by client-side code, vice
versa? Any other tips related to the subject is welcomed as well.

thanks,
rodchar

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5170
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly remove old version (as well as the mx libraries I had installed). I then installed the new version as a user with the Administrator role. I know I'm...
2
4655
by: Rhino | last post by:
I am trying to verify that I correctly understand something I saw in the DB2 Information Center. I am running DB2 Personal Edition V8.2.1 on Windows. I came across the following in the Info Center: To return a result set from a procedure to the originating application, use the WITH RETURN TO CLIENT clause. When WITH RETURN TO CLIENT is...
5
2199
by: Paul H | last post by:
How do you folks get a reliable and complete brief of what is required before development starts? I am forever going back to a client once a project has started saying "Hang on, now that I've started building this I realise what you want is impossible, we'll have to do this way instead....etc.." OK, so this is partly down to me not...
11
4195
by: pshindle | last post by:
We have several machines currently running the DB2 V7 Run-time Client that we would like to actually be running the App Dev Client. To 'upgrade' (within the same version) this client software can we simply install the App Dev Client on 'top of' the Run-time Client? Will the install routine uninstall the Run-time Client under the covers...
2
7563
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking. Any help appreciated! The ordeal is a follows I am using Solaris 10 with php5.1.1. GCC:
11
2197
by: Wayne | last post by:
I am a one man enterprise and have been asked by a prospective client what happens to their database regarding ongoing changes etc if I get hit by a bus. Obviously my databases are distributed as mde files in an effort to protect my intellectual property. How do I give the client peace of mind, short of giving them a backup mdb file that...
1
3404
by: WebServiceSecurity | last post by:
The issue involves the following technologies: - 1. .NET 2.0 Framework 2. WSE2.0 (WS-Security) 3. X.509 certificates 4. BEA Weblogic 8.1.5
3
2608
by: rjha94 | last post by:
Hi I just installed the runtime client on my windows machine. when i go inside the SQLLIB\bin folder i can see db2.exe. is it possible to use this db2 bundled with runtime client for command line processing? Because all the documents tell you to get an administration/ application client to do such thing. Thanks - Rajeev.
4
9274
MMcCarthy
by: MMcCarthy | last post by:
http://bytes.com/images/howtos/projectscope_blocks.jpgAs a freelance IT consultant for over 10 years, I’ve come to appreciate well defined project scopes. A project scope is a common understanding between you and your client as to what work is included in, or excluded from, a project.In a study done by CA towards end of last year, one third of all...
11
7670
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which enabled me to the contacts at least list. I had to root around to discover CdoDefaultFolderContacts (though it was guessable; how could I...
0
7697
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...
1
7672
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...
0
7968
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...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
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...

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.