Reome querry来自url的字符串和设置url而没有querry字符串 [英] Reome querry string from url and set url without querry string
本文介绍了Reome querry来自url的字符串和设置url而没有querry字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
代码是
Code is
if (!Page.IsPostBack)
{
insertOrUpdateForm(0, 0);
}
if(Request.QueryString["a"]!=null)
{
// i want to set url without postback this is not working
Request.Url.AbsoluteUri.Replace(Request.Url.Query, "");
}
推荐答案
string url = "http://www.somesite.com/mypage.aspx?myvalue1=hello&myvalue2=goodbye";
string path = url.Substring(0, url.IndexOf("?"));
使用它肯定是Help.This Is Tested Solution
Use This It would Be definately Help.This Is Tested Solution
这篇关于Reome querry来自url的字符串和设置url而没有querry字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文