Hi all,
I am facing challenge of changing action attribute of html form tag. As my application is on shared hosting (medium trust) environment of godaddy server, I cannot use reflection to get control adapter of html tag page. So, I cannot use the following code in my Url Rewriting module.
private void RegisterControlAdapters(object sender, EventArgs e)
{
Page page = (Page)sender;
page.PreRender -= new EventHandler(RegisterControlAdapters);
if (page.Form != null)
{
FieldInfo adapterFieldInfo = page.Form.GetType().GetField("_adapter", BindingFlags.NonPublic | BindingFlags.Instance);
if (adapterFieldInfo != null)
{
HtmlFormAdapter adapter = new HtmlFormAdapter();
FieldInfo controlFieldInfo = adapter.GetType().GetField("_control", BindingFlags.NonPublic | BindingFlags.Instance);
if (cont ...
Go to the complete details ...