473,698 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to call vb.net code behind function using javascript

92 New Member
Hi,

I have a function in aspx.vb (code behind fucntion). Now I want to call this function using javascript... How can I call?
May 14 '10 #1
1 3868
gits
5,390 Recognized Expert Moderator Expert
you cannot directly call code behind - code behind is executed serverside so you would need to do a request - i think with that ASP.net stuff it's called 'postBack' - so that the code behind would be invoked ... or use an AJAX call to do the request

kind regards
May 14 '10 #2

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

Similar topics

2
6905
by: Fred Armitage | last post by:
I have a fairly complex application written using a vb code-behind dll. However, I'd like to write one particular aspx page utilising in-line code so that it can easily be modified as needed by the end user, and yet still utilise some functions in the code-behind dll. Is this possible? (How?)
7
10981
by: C.Joseph Drayton | last post by:
I have a problem that I am hoping someone can help me with. First let me describe the problem. I have an HTML form that in one field has an onBlur call to a JavaScript function. When you exit the field, it calls the JavaScript routine, which in turn calls a PHP script. The PHP script runs returns the value needed. And returns to the JavaScript. The JavaScript function is then supposed to set alerts depending on the values returned from...
5
12823
by: jason.gyetko | last post by:
I'm using JavaScript to capture a keypress in my web form. Right now all it does is post an alert message box. Is there a way to have it call a function in my VB code behind? All I really want to do is open another web form when a certain key is pressed. I guess I'd also like to be able to give focus to a specific textbox on the page when a key is pressed. In case you're wondering why... I am scanning in most of my values and each...
1
9743
by: lee_youjin | last post by:
I needed to defect when the user is clicking the IE X button ( top right). so I could execute the cleanup function. I was able to detect it using onbeforeunload event. Now I need to call the function in code behind from onbeforeunload event call. but that is where I have a problem... please refer my code below
3
15587
by: akg | last post by:
Hi Gurus, I have a requirement like below. In my asp.net(C#) code behind file "MyPage.aspx.cs" file I have a function like below: void PopulateAccount(int AccountNumber) { this.AccountNumber.Text = AccountNumber; } I want to call this function from JavaScript (inside the window.onload function) from my MyPage.aspx page, something like below:
5
70622
by: teenIce | last post by:
Hi guys, How do I access flash function using javascript?Does anyone have any reference or code? Thanks...
1
1748
by: jerin | last post by:
Hi, I dont know "how to call a serverside function through javascript".When i tried to call the function like this: <%=FillAnmID() %> where FillAnmID is the server side function. I got a compilation error like this " Overload resolution failed because no accessible 'Write' can be called with these arguments". Is there any solution for it . plz inform me. I need it.
0
8524
forsiam
by: forsiam | last post by:
I've seen the example in http://www.thescripts.com/forum/thread694359.html but I still have problem about javascript. (I use SWFObject) My Action Script import flash.external.ExternalInterface;
1
1867
by: vartana | last post by:
how can i call a none static function using javascript? javascript:GetData() Public Sub GetData() Dim objNL As New NLEngine Dim dtNewsList As New Data.DataTable dtNewsList.Columns.Add("title") dtNewsList.Columns.Add("old") dtNewsList.Columns.Add("flaged")
1
7197
by: mikegolden | last post by:
An application I'm working on makes extensive use of output parameters and return values, thus forcing me to use the ADODB Command object to execute the stored procs. For recordset returning stored procs, calling Execute() is no problem using JavaScript: var rs = cmd.Execute(); However, for non-recordset returning stored procs -- and this app has many -- I need to call Execute() passing adExecuteNoRecords for the Options parameter,...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
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...
1
8887
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
8856
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...
0
5858
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();...
0
4360
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
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.