से वर्तमान पृष्ठ मिलता है। उदाहरण के लिए Default6.aspx मुझे पता है कि मैं निम्नलिखित कर सकता हूं:मैं वर्तमान पृष्ठ को पुन: प्राप्त करने के लिए एक सी # विधि लिखना चाहते यूआरएल
string url = HttpContext.Current.Request.Url.AbsoluteUri;
// http://localhost:1302/TESTERS/Default6.aspx
string path = HttpContext.Current.Request.Url.AbsolutePath;
// /TESTERS/Default6.aspx
string host = HttpContext.Current.Request.Url.Host;
// localhost
लेकिन मैं Default6.aspx कैसे प्राप्त कर सकता हूं? और अगर यूआरएल http://localhost:1302/TESTERS/ है, मेरे विधि default.aspx लौटना चाहिए
सोचो कि होना चाहिए 'Path.GetFileName (Request.Url.AbsolutePath)' के रूप में @ एक ही बात मिल जाएगा – user489998
क्या मैं URL में '#' अगर ..... यानी: http: test.abc.com /sitesposure.aspx#commentfocus ......... क्या यह काम करेगा? –