Hide Action details at Form section

S

Sam Vel

Hello Friends

I have a site which is developed such that the aspx page which is
shown at the address bar is different from the actual page executed
but when we look at the source ALT+V->C(IE) or CTL+U the actual page
name is shown in form section

<form name="aspnetForm" method="post" action="z.aspx?N=6"
onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">

At the above code I want to Hide or change "action="z.aspx?N=6"" to
some thing different

Can anyone tell how to change that

Any ideas can also be helpfull

Regards
SamVel
 
G

Guest

Hello Friends

I have a site which is developed such that the aspx page which is
shown at the address bar is different from the actual page executed
but when we look at the source ALT+V->C(IE) or CTL+U the actual page
name is shown in form section

<form name="aspnetForm" method="post" action="z.aspx?N=6"
onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">

At the above code I want to Hide or change "action="z.aspx?N=6"" to
some thing different

Can anyone tell how to change that

Any ideas can also be helpfull

Regards
SamVel

<form action="javascript:redirect()">

in js

function redirect()
{
window.location = xxx;
}
 
G

George

What you doing is called URL rewriting and this is a known problem with
ASP.NET rewriting (which unfortunately is not mentioned in numerous articles
about URL rewriting)
The solution is to remember original URL before rewriting happened and then
right before rendering (in PreRender event) rewrite URL back to it.

In .NET 3.5 you can simply set the action property of the form. So you do
not need to rewire URL back.
probably something like this will work
if( this.Form != null )
this.Form.action="";

George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top