473,500 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server side function calling

Hi,
Uses: VS.NET 2003, VB.NET, Windows xp

I've written an apsx web page through vb.net. In that I've mentioned a
procedure(Server Side). Now I want to call it through Jscript.

The reason behind is about validations. There are some text to enter in one
text box. So once the user has entered the text, it will check whether the
text is null, if not it will call that server side procedure I've mentioned
in aspx page.

I'm wondering how can I call it. One guy in the news group said to use the
following:

1. __doPostBack(...);
2. document.forms[0].submit();
3. document.getElementById(<Some asp control's client ID>).click();

however it wasn't specific and I didn't understod how to use it. Using codes
to illustrate the solution will be much worthy here.

Thank you,
--
Mohammed Hifni Shahzard Nazeer,
JB Securities Pvt. Ltd.,
Colombo.
Nov 19 '05 #1
2 1338
Hifni Shahzard wrote:
Hi,
Uses: VS.NET 2003, VB.NET, Windows xp

I've written an apsx web page through vb.net. In that I've mentioned a
procedure(Server Side). Now I want to call it through Jscript.

The reason behind is about validations. There are some text to enter
in one text box. So once the user has entered the text, it will check
whether the text is null, if not it will call that server side
procedure I've mentioned in aspx page.

I'm wondering how can I call it. One guy in the news group said to
use the following:

1. __doPostBack(...);
2. document.forms[0].submit();
3. document.getElementById(<Some asp control's client ID>).click();

however it wasn't specific and I didn't understod how to use it.
Using codes to illustrate the solution will be much worthy here.

Thank you,


If you want validation, use a CustomValidator. You could provide some
client-side javascript, but that's not required. You are after the server-side
event. There you can do your validation.

Hans Kesting
Nov 19 '05 #2
You can use the AJAX.NET libraries to asynchronously do a server side method
call easily through javascript.

Go here http://ajax.schwarz-interactive.de/c...e/default.aspx for
examples and downloadable libraries and code.

--
- Paul Glavich
MVP ASP.NET
http://weblogs.asp.net/pglavich
ASPInsiders member - http://www.aspinsiders.com
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Hifni Shahzard wrote:
Hi,
Uses: VS.NET 2003, VB.NET, Windows xp

I've written an apsx web page through vb.net. In that I've mentioned a
procedure(Server Side). Now I want to call it through Jscript.

The reason behind is about validations. There are some text to enter
in one text box. So once the user has entered the text, it will check
whether the text is null, if not it will call that server side
procedure I've mentioned in aspx page.

I'm wondering how can I call it. One guy in the news group said to
use the following:

1. __doPostBack(...);
2. document.forms[0].submit();
3. document.getElementById(<Some asp control's client ID>).click();

however it wasn't specific and I didn't understod how to use it.
Using codes to illustrate the solution will be much worthy here.

Thank you,


If you want validation, use a CustomValidator. You could provide some
client-side javascript, but that's not required. You are after the
server-side
event. There you can do your validation.

Hans Kesting

Nov 19 '05 #3

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

Similar topics

3
6763
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?...
1
2240
by: Benny | last post by:
Hello all, How can i call a server side function (in .aspx.cs) from a client side (in .aspx) using javascript? thanks, benny *** Sent via Developersdex http://www.developersdex.com ***
3
1581
by: Reetu | last post by:
Hi All, I have an html button on .aspx page. <INPUT class="sbttn" id="btnComplete0" onclick="onComplete ()" type="button" value="Mark Completed" name="btnComplete0"> When the user clicks...
4
10122
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all...
3
1684
by: Ohad Young | last post by:
Hi, I have a frameset page that contains two frames: 1. the first frame, an aspx page, contains a menu for navigating in the website. 2. the second frame contains content, pdf, html or other...
7
1554
by: Roger | last post by:
Is this possible?? client side: <script language="jscript"> function hello() { window.alert("HELLO!"); } </script>
9
2206
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see)...
3
15494
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.
1
1916
by: John Chan | last post by:
Hi, Im doing a maintenance application in ajax and coldfusion at work on IE6 exclusively. I have a save button on each form and i have to do various validations server side and on client side...
5
2142
by: Simon | last post by:
I heard that we could do that by using AJAX. Could anybody share how to do it? Thanks.
0
7136
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
7232
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...
1
6906
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
5490
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,...
0
4611
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...
0
3110
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...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1430
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 ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.