0

i have complete url with flag after successful naviation of page like :

protected void Repeater_EasyMailSystem_ItemCommand(object source, 

    RepeaterCommandEventArgs e)
        {
            Response.Redirect(e.CommandArgument.ToString());
        }
        protected void Repeater_Template_management_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            Response.Redirect(e.CommandArgument.ToString());
        }

this is url drawn url bar :

http://localhost:2670/Mail.aspx?flag=1
http://localhost:2670/Mail.aspx?flag=2
http://localhost:2670/Mail.aspx?flag=3
http://localhost:2670/Mail.aspx?flag=4

how ever it's okay for navigation from menu item click. But i don't need this url while posting back page with submit button. It'a passout page.Isvalid and clears all inputs specified at submit time.

please help me

Gajjar Shalin
  • 95
  • 1
  • 11
  • To hide it, you will need to use routes in order to hide the file name and the get request. Then from there you could have something such as "localhost:2670/Mail/2" rather than what you currently have. There is no way to remove it as easily but this way it's not clear what it is to the user and looks more user friendly too. If you did want it fully removing you would have to add code to your controller to get the flag, store in session memory and then redirect to a page where it reads the session rather than the flag. – Sasha Mar 14 '17 at 09:44
  • 1
    [Read this](http://stackoverflow.com/questions/529551/how-can-i-remove-item-from-querystring-in-asp-net-using-c) – Techno Crave Mar 14 '17 at 09:45
  • i appreciate you. but i can't use session for short term operation – Gajjar Shalin Mar 14 '17 at 09:49
  • i just simply remove flag=1 portion after successful redirect. – Gajjar Shalin Mar 14 '17 at 09:56

0 Answers0