Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 14th, 2005, 03:09 PM
Authorized User
Join Date: Dec 2004
Location: Mexico City, , Mexico.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default Executing from JavaScript C# functions

From JavaScript I need to execute a function write in C#.
I have not found the way to do it not using __doPostBack, but problem is that using __doPostBack is generating a post back event from a script that is into a link button.
I’d like to see the way to execute a function write in C# from JavaScript avoiding a post back.
If somebody knows how to attain it, I Hill thank very much.

El Hombre que tiene Amigos ha de mostrarse Amigo
El Hombre que tiene Amigos ha de mostrarse Amigo
  #2 (permalink)  
Old March 1st, 2005, 07:02 PM
Registered User
Join Date: Mar 2005
Location: Little Elm, TX, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


Other programmers may not respond to this post. The reasons is you're mixing up client/server-side code. The _doPostPack method is not going to do what you're anticipating. Javascipt code is processed by the client and can not invoke server side code, this would bascially create an unintentional security hole. To run server-side code you'd have to submit a post-back to invoke the methods you'd like to process your form.

Good luck on this request.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a JavaScript Function from XSL IronStar XSLT 5 July 8th, 2010 07:49 PM
Executing Javascript on Page_Load kulkarnimonica ASP.NET 2.0 Professional 2 August 10th, 2007 02:12 PM
AJAX, javascript not executing html code niklas JSP Basics 0 August 17th, 2006 04:27 AM
Dynamically call javascript functions austinf Javascript 1 May 13th, 2006 07:31 AM
javascript functions Moharo Javascript 1 September 23rd, 2003 01:04 AM

All times are GMT -4. The time now is 04:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.