I'm trying to create an ascx form in vs.net that can be posted. The problem is 2fold.
Firstly .aspx forms have only 1 form element allowed. So the ascx form submit doesn't use the ascx form action. Instead it defaults to the parent .aspx form action.
I am therefore exploring my options and here I am at jquery.
I'm hoping that using jquery I can insert script in the ascx so that I can post the form correctly.
So....I have a vb.net user control (.ascx) inserted in a vb.net webform (.aspx). I want to post a form from the .ascx
By the way if I insert the following code in the .ascx it works.
$(document).ready(function(){
$("a").click(function(event){ alert("Thanks for visiting!"); });
});
sure enough if i click any link, i get the alert.
The code i tried to use for the form submit is:
$('#Test').submit(function () { alert('Handler for .submit() called.'); return false; });
any help and guidance will be much appreciated.