Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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

Hello:
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.
A.L.

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
Default

A.L.

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.
Justiceleague32



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





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