Solved

ASP.net Call a VB.net procedure from a button

Posted on 2014-04-14
4
328 Views
Last Modified: 2014-04-14
Hi
I have the following button in my ASP.net VB.net project
When I click on it it creates the code further down
How do I call a VB.net procedure from this?

<button id="button10"  class="myHoverButton" onclick="return button10_onclick()">Who needs aesthetic dentistry</button>


// <![CDATA[

        function button10_onclick() {

        }

// ]]>
0
Comment
Question by:murbro
  • 2
  • 2
4 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39999003
Do you mean how do you call a server-side method from client-side javascript?
0
 

Author Comment

by:murbro
ID: 39999013
Yes. Thanks
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 39999019
OK. What do you need to do in the server-side method? To call it from the client it would need to be a WebMethod, which means it has to be Shared, which restricts what context based information you have available.

Otherwise you'd have to perform a full GET request and strip out the information you want from the result - if you expect a result that is.
0
 

Author Closing Comment

by:murbro
ID: 39999602
Thanks for the direction. I'll explore further
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now