473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

call server side function from javascript .net 2008??

well i try to call a server side function from the javascrpt like this but it seemed that it is impossible with this way , anybody knows how could be done this???? :


in the aspx i have:

<script language="javascript">

function WindoClose() {
'<%=myserversideFunction%>'

window.close();
</script>

<td colspan="2" align="right" valign="top" style="padding:0 17 49 0;"><a href="#" onclick = "WindoClose;" ><img src="images/closePopup.gif" border="0" /></a></td>
Sep 8 '08 #1
3 1216
Frinavale
9,735 Expert Mod 8TB
You have to use Ajax to call server side code.

Please provide more details about what you are trying to do so that I can provide a more helpful answer.

-Frinny
Sep 8 '08 #2
You have to use Ajax to call server side code.

Please provide more details about what you are trying to do so that I can provide a more helpful answer.

-Frinny

well what i trya to do is execute one funcion in code behind and the close the window
Sep 9 '08 #3
Frinavale
9,735 Expert Mod 8TB
well what i trya to do is execute one funcion in code behind and the close the window
Well if you execute the function in a LinkButton click, place the LinkButton within an UpdatePanel, place the code that you want to execute in the Click event for the LinkButton and have the page load normally.

This will cause an asynchronous Ajax call to fire which will execute the LinkButton Click event (in turn executing the code you need to run) and only the UpdatePanel that the LinkButton is in will refresh when the page is re-rendered in the browser.

-Frinny
Sep 9 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: chirs | last post by:
I am trying to understand a piece of code. In a javascrpit file, there is a function: function ItemStyle(){ var names=; addProps(this,arguments,names,true); }; In the html file, it calls...
1
by: cheezebeetle | last post by:
ok, so I am having problems passing in an ASPX function into the Javascript in the codebehind page. I am simply using a confirm call which when they press "OK" they call this ASPX function, when...
3
by: David Shorthouse | last post by:
Hey folks, Not an off-topic posting.....since I was shot-down in an earlier post...this one's legit. How do I go about calling a server-side vbscript within a client-side javascript function?...
39
by: Randell D. | last post by:
Folks, I'm sure this can be done legally, and not thru tricks of the trade - I hope someone can help. I'm writing a 'tool' (a function) which can be used generically in any of my projects. ...
3
by: lanem | last post by:
I want to call a server-side function, like a button's click event, from a client-side JavaScript function. How do I do that? Thanks.
4
by: abcd | last post by:
I am novice asp.net programmer. I have xyz.js file which has resuable functions. I have asp.net form abcd.aspx and the code behind file abcd.aspx.cs, I want to put a 'Help' button when clicked...
10
by: Paul | last post by:
Hi I am using the HtmlInputFile control to upload a file from a client to a server. I have a browse to find the file on the server but need to create the path dynamically as to were it will go...
1
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but...
5
by: Simon | last post by:
I heard that we could do that by using AJAX. Could anybody share how to do it? Thanks.
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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,...

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.