QueryString

  • Thread starter Thread starter Ana Rita
  • Start date Start date
I have this URL:
http://localhost/DmicroWeb/RecursosHumanos/WebManDPERendime
ntos/RendimentoAgregado.aspx

in the click of an html button i transform the url into:
http://localhost/DmicroWeb/RecursosHumanos/WebManDPERendime
ntos/RendimentoAgregado.aspx?Pergunta=Sim

It's possible to return to the first url?

Thank you all.

Ana Rita

Ana,

Use the System.Uri class:

Uri myUri = new
Uri(@"http://localhost/DmicroWeb/RecursosHumanos/WebManDPERendime
ntos/RendimentoAgregado.aspx?Pergunta=Sim");

// Get just the path (i.e. leave off the "?Pergunta=Sim" part).
string myPath = myUri.AbsolutePath;


Hope this helps.

Chris.
 
Back
Top