For example, if I have http://www.mywebsite.com/about.aspx . Store about.aspx (or any other page we're on) in a variable. It also needs this to work, even if there is information in the URL after the page, such as a query string.
A - I suggest you read the ASP.NET documentation VERY carefully. The HttpRequest object, available as a Request property, contains all the information you can get about the request. This includes a path called all parameters, etc.
, , .
Uri Path. :
Uri test = new Uri("http://www.microsoft.com/default.aspx?id=7&em=958"); Console.WriteLine(Path.GetFileName(test.AbsolutePath));
, "" , .
Source: https://habr.com/ru/post/1772985/More articles:git push not working in new branch - gitAmbiguity Resolution - c ++check if the number is int or float - typesWhen is MS Access better than a web application supported by RDBMS? - ms-accessHow to contact android ril daemon directly - androidWhy are PHP errors related? - phpОшибка Python: встроенная функция или объект метода не имеет атрибута 'StringIO' - pythonPHP configuration files (XML versus YAML and PHP files) - xmlC # check domain live - c #404 Custom Action in Rails - ruby | fooobar.comAll Articles