Last post Sep 29, 2015 11:21 AM by Mikesdotnetting
Sep 29, 2015 10:38 AM|Dior1|LINK
I have a aspx.vb page with a simple DB Query. The Result is stored in a string variable.
I´m able to Show the value in a textarea in my aspx page but i like to use the variable in a separate html page and in a separate .js page.
How can I do this?
Sep 29, 2015 11:18 AM|DeadTroll|LINK
For a separate aspx page you can use a session value
session("myValue") = myVariable
i like to use the variable in a separate html page
and in a separate .js page.
Sep 29, 2015 11:21 AM|Mikesdotnetting|LINK
There's no such thing as a .js page. Also, HTML doesn't support "variables". What you could do is use AJAX (jQuery is easiest) to get the value from your database for display in an HTML file: http://www.mikesdotnetting.com/article/104/many-ways-to-communicate-with-your-database-using-jquery-ajax-and-asp-net