Reputation: 85
I made a webform in html and I have a website in C#. I would like this form to show up every time the page is loaded.
What is the best way to integrate/include/call the form? Which pages I have to modify? Default.Aspx or Default.Aspx.cs?
The purpose of this project is to show this form everytime the cookies is not set in the aspx code. Which I guess I have to modify the aspx part that checks if the value of the cookie is set or not and show/not show the webform based on this value.
Upvotes: 0
Views: 565
Reputation: 85
Some little progress.
That's how I modified my pages for my needs. In this way the html webform is diplaying correctly.
In the head of default.master I added:
in the default.aspx I added:
with the entire html of my html page (tag html included).
Now I need to modify this page that in the way this pop up is showed only if a cookie value is not set.
Upvotes: 0
Reputation: 709
You could do this using a combination of JavaScript (to check if cookies are enabled) and JQuery. If cookies aren't enabled, have a placeholder DIV that can hold the HTML content you wanted to show. Then use $.ajax (http://api.jquery.com/jquery.ajax/) to load the html content from browser and set the DIV's innerHTML property with the returned HTML.
Hope this works for you!!
Upvotes: 1