我有这个
declare @testtable table (test nvarchar(max))
insert into @testtable (test) values ('1.2.3')
insert into @testtable (test) values ('1.20.3')
insert into @testtable (test) values ('1.19.x')
insert into @testtable (test) values ('1.x.x')
insert into @testtable (test) values ('1.19.3')
insert into @testtable (test) values ('DEC09')
insert into @testtable (test) values ('Plutonium')
insert into @testtable (test) values ('dec09')
insert into @testtable (test) values ('N/A')
insert into @testtable (test) values ('MyTest20')
insert into @testtable (test) values ('20MyTest')
insert into @testtable (test) values ('1.4.18')
insert into …Run Code Online (Sandbox Code Playgroud) 我已经有了一个ASP.NET网站
我想改变我的网站更多SEO网址友好.
我想改变前.这个网站:www.mydomain.aspx?articleID = 5
to:www.mydomain/article/learningURLrewrite - 需要从DB读取文章名称
我该如何做到这一点?
我已经尝试过谷歌的一些文章,提到IhttpModule没有任何运气.
我的目标是让一个类负责基于folderpath重定向(如下所示):
string folderpath = "my folderpath" (could be articles, products etc.)
string id = Request.QueryString["id"].ToString();
if(folderpath.equals("articles"))
{
string name = //find name from id in DB
//redirect user to www.mydomain/article/name
}
if(folderpath.equals("products"))
{
string name = //find name from id in DB
//redirect user to www.mydomain/products/name
}
Run Code Online (Sandbox Code Playgroud)
另外我想删除aspx扩展名
嗨,我正在尝试将数据发送到Web服务
String url =" https://www.myurl.com ";
URL urlobj = new URL(url);
HttpsURLConnection con = (HttpsURLConnection) urlobj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
String urlParameters = GenerateUrlParameters(data);
con.setDoOutput(true);
con.setDoInput(true);
Log.i("test", "hit1");
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
Log.i("test", "hit2");
wr.writeBytes(urlParameters);
wr.flush();
wr.close();
Run Code Online (Sandbox Code Playgroud)
Hit1被击中,但它在下一行失败并且没有击中hit2.我究竟做错了什么 ?
我的logcat
10-18 09:17:33.302: D/gralloc_goldfish(2228): Emulator without GPU emulation detected.
10-18 09:17:33.322: W/TextLayoutCache(2228): computeValuesWithHarfbuzz -- need to force to single run
10-18 09:17:37.862: I/test(2228): hit1
10-18 09:17:37.872: D/AndroidRuntime(2228): Shutting down VM
10-18 09:17:37.872: W/dalvikvm(2228): threadid=1: thread exiting with uncaught exception (group=0x409961f8)
10-18 …Run Code Online (Sandbox Code Playgroud)