Can't combine client-side & server-side

I have aspx file (with master page). I need to activate cilent-side vb script function (which is in the aspx) that gets remote IP address and resolve it's hostname.

but I'm not able to send the IP' this is my code:

<td>document.write(GetHostNameFromIP(<%Request.ServerVariables("REMOTE_ADDR")%>)))</td>

can someone tell me what's wrong ?

0
robbis
6/5/2007 10:25:10 AM
asp.net.client-side 24353 articles. 1 followers. Follow

1 Replies
761 Views

Similar Articles

[PageSpeed] 35

Seems you should write something like: <td><script type="text/vbscript">document.write(GetHostNameFromIP(<%= Request.ServerVariables("REMOTE_ADDR") %>)))</script></td>

0
Rubo
6/5/2007 11:19:14 AM
Reply:

Similar Artilces:

Modifications in client side can't be detected in server side.
Hi, I have 2 HTML controls in my page, that run at server, Drop Down List (Copy From), List Box (Copy To), and 1 ASPX button, On the page load i populate the DDL, from database, 3 item added for example. At the end of HTML page, a java script code call a JS function, that function get all items of DDL and remove the selected item, and place the other 2 items in list box, so if i have A, B, C in DDL, and A Selected, the script only place B, and C in the list box. The population of DDL performed in the server side, the population of list box performed in the client side by java scrip...

Can we check validation both on client side & server side?
 Hi All, Can we check validation both on client side & server side?Thanks & RegardsNeeraj  Yes, the standard asp.net validation controls already do this.Before you process any code on the server side that should have passed through validation you need to check Page.IsValid = trueThis will also catch the situation where the user has javascript disabled. yes you can check validation both the side as per your requirement.Most advantage is that if some user set the JavaScript Enabled False in the Browser settings at that time we don't worry about any validat...

Firing both Client side event and server side event for server side button
I am having some difficulties getting this to work.. I have button_click (Asp.net) and ClientClick (Javascript).  Javascript is firing fine.  Server script is not. may be you have return return false in the in the javascript which is why its not firing server side event.You should add javascript evelt like thisbutton1.onclientclick = "functionname" Function should nopt return false. Vikram www.vikramlakhotia.comPlease mark the answer if it helped you...

Client-side & Server-side cursors
HI,What is the difference between  Client-side & Server-side cursors? How do we define and use it?Which is default one that .net program uses?Thanks Here is an acronym I learned on another forum. JFGI. MS article   Another good articleBeware of bugs in the above code; I have only proved it correct, not tried it. (Donald Knuth)...

Problem between client-side & server-side
I have two select controls (HtmlControl) here. They are set to runat='server'. I've bind some data to them when create. I also have a cliet side script to change them one's option to another using javascript. The question is how i can get items of theirs when they're posted back? The controls are like this: <SELECT language="jscript" id="LbFrom" ondblclick="return LbFrom_ondblclick()"multiple size="9" name="Select1" runat="server"> <option></option>'some option here .. .. .. </selec...

client side click handler / server-side command event doesn't fire
I am rewriting an old control of mine to be more AJAX-friendly. It is a subclass of Button that disables itself when clicked, so that the user can't, say, double post a credit card payment. I have some javascript code for the prototype including this: _onClick : function(e) { if(this.get_element() && !this.get_element().disabled && this._DisableAfterClick == true) { this.get_element().disabled = true; if (this._DisabledText != null && this._DisabledText.length > 0) { this.get_element().value = this._DisabledText; } } //this.get_element().form.s...

client-side and server-side?
hi, can someone tells me how diff is client side and server side are these two? When I tried to do validation ... I would use Javascript ... which has something like: document.forms[0] ... I think that's client side. My understanding on server side is the "form" ... like u will have <form action=".." method=post> ..... </form> ... so it will send to server ... am I on the right track? Are there any other type of server side examples? Hi, ASP.NET itself is server side. Every piece of code processed is done on a server. What comes out of this is sent ...

Client side and server side
We have a application, where we have some validation on the clientside using EnableClientSideValidation. If you don't have fullscreen you can't see some of the error-messages. What we want is to jump to the place on the page where the message is displayed. One problem is that the button is a serverbutton (runat="server"). How can we accomplish this on the clientside using the same button. I have tried to use "onClientClick" and a link something like this:   <A HREF=http://forums.asp.net/AddPost.aspx?ForumID=18#form>form<...

What is Client Side and Server Side?
I am New of ASP.Net What we can and should do client side and Server Side? What uses? Please any one clear my doubt. Thanking YouEndendrum Priyamudan P m R Clientside is basically what a person can see and serverside is where actions get processed. that's kinda simply puyt but thats the deal, you code serverside, and the html and javascript it generates let's the users for example click a button, then serverside you have coded what should happen when a button gets clicked for example turn text red. Then the server sends a new page with red text to the client (clientside...

Server-side or Client-side
In general, I'm wondering if there are any criteria to use when choosing between using a client side element or a server side element. For example, if I'm going to put an HTML table on a page, how do I decide whether or not to use a server control?  Should the server side always be chosen or if there is not explicit server side functionality required is it better to opt for a "normal" client side table? Obviously, if there is a need for server side control the question is answered, I'm looking more at more ambiguous situations. Thanks  This is from Micros...

Server Side or Client Side
Hi I'm a bit confused about this whole server side / client side thing. Are applets, embeded objects consider client side? If I have a form within my aspx page which connects to a database on the server side what is it considered? If I have some business logic written within a VB file when the client access the functions within that business logic (for example some kind of validation function) does the client browser actually downloads that VB file? Can someone suggest how to differentiate between client side and server side components within a asp.net based website?  Hi, i can&#...

Combining a server-side control with a client-side control!
Hi all, I am trying to combine a server-side control with a client-side control. I have created a listbox in both sides, the client-side control's code is: <select size="4" name="lstFruit" id="Select1" ondblclick="lst_dblClick" visible="false"> <option value="Banana">Banana</option> <option value="Apple">Apple</option> <option value="Mango">Mango</option> <option value="Orange">Orange</option> </select> The other one is the server-side control which has this code:   I wanted to add the ondblClick attribute to the se...

How can you raise server side event from client side
Let's say I have an event on server side that handles button_click. how can I raise that event from client side using AJAX. You can create a script in a string variable, and register withScriptManager.RegisterStartupScript http://msdn.microsoft.com/en-us/library/bb359558.aspx string script = "alert('ciao!')";ScriptManager.RegisterStartupScript( this, this.GetType(), "Alert", script, true );If this answers your question, please select 'mark as answer' thanks!Andrea DottorMicrosoft MVP - ASP/ASP.NEThttp://blog.dottor.net For buttons you can use JQu...

Jscript, moving from client-side to server-side (.NET)
Hey all I’m working translating a web-app written in client-side Jscript to run on the server-side as JScript.NET. Without needing to get too specific, I am using Jscript because the original page aggregated raw data to produce statistical results (this was done dynamically based on user 'sort-by' options). The final output is an html report that can be emailed. Because this is currently being done on the client side, as the raw data grows the load-time grows as well (to the point that has almost become unusable). I’m posting here to see if anyone has any experi...

Web resources about - Can't combine client-side & server-side - asp.net.client-side

Client-side - Wikipedia, the free encyclopedia
Client-side refers to operations that are performed by the client in a client–server relationship in a computer network . Typically, a client ...

Senior Search Manager - Client Side!!
... strategy insight for senior IT management - resources to understand and leverage information technology. Senior Search Manager - Client Side ...

Account Manager - Client Side - Previous Agency Experience Welcome!!
Computerworld Australia is the leading source of technology news, analysis and tools for IT decision makers, managers and professionals.

Media Sales Executive - Client Side!!
Technology news and reviews for business and home.

PPC Paid Search Manager - CLIENT SIDE
Defining Technology for Australia's IT Leaders. PPC Paid Search Manager - SEM - **CLIENT SIDE** Sydney CBD Location Client side!! SEM/PPC/Paid ...

How Basecamp Next got to be so damn fast without using much client-side UI
When we started working on Basecamp Next last year, we had much internal debate about whether we should evolve the existing code base or rewrite ...

Seven Tips for Pitching From the Client's Side of the Table
I had a chance to sit on the other side of the pitch table. Here is what I learned.

Client-side coding: How to prevent malicious use?
Applications that run on a user-controlled device cannot be perfectly protected.

The client side
... regarding the professionals you seek to assist. Even better if you possess that understanding yourself, having worked on the client side. I'm ...

Ecommerce traffic being hijacked by client side malware
According to new research 15 to 30 percent of eCommerce site visitors are infected with Client Side Injected Malware (CSIM) that causes them ...

Resources last updated: 1/9/2016 6:14:09 PM