Need help with an AJAX workflow

Posted by Anders on Stack Overflow See other posts from Stack Overflow or by Anders
Published on 2009-01-07T18:01:34Z Indexed on 2010/03/15 23:49 UTC
Read the original article Hit count: 403

Filed under:
|

Sorry I couldn't be more descriptive with the title, I will elaborate fully below:

I have a web application that I want to implement some AJAX functionality into. Currently, it is running ASP.NET 3.5 with VB.NET codebehind. My current "problem" is I want to dynamically be able to populate a DIV when a user clicks an item on a list. The list item currently contains a HttpUtility.UrlEncode() (ASP.NET) string of the content that should appear in the DIV.

Example:

    <li onclick="setFAQ('The+maximum+number+of+digits+a+patient+account+number+can+contain+is+ten+(10).');">
What is the maximum number of digits a patient account number can contain?</li>

I can decode the string partially with the JavaScript function unescape() but it does not fully decode the string. I would much rather pass the JavaScript function the faq ID then somehow pull the information from the database where it originates.

I am 99% sure it is impossible to call an ASP function from within a JavaScript function, so I am kind of stumped. I am kind of new to AJAX/ASP.NET so this is a learning experience for me.

© Stack Overflow or respective owner

Related posts about asp.net-ajax

Related posts about JavaScript