我有路线:
string lastname = Request.QueryString["lastname"];
string location = Request.QueryString["location"];
string speciality = Request.QueryString["speciality"];
SqlConnection cnn = new SqlConnection("Server=.;Database=db;Trusted_Connection=True;");
SqlDataAdapter adp = new SqlDataAdapter("select * from Table where lastname=@lname,location=@loc,speciality=@spec",cnn);
cnn.Open();
adp.SelectCommand.Parameters.AddWithValue("@lname", lastname);
adp.SelectCommand.Parameters.AddWithValue("@loc", location);
adp.SelectCommand.Parameters.AddWithValue("@spec", speciality);
DataTable dt = new DataTable();
adp.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
然后我访问routes: {
"": "main",
"!/order/:id": "order",
"!/order": "order"
},
。但我的网址更改为:http://mysite.ru/#!/order/21
21号正在隐藏。如何在我的网址中保存此号码?
答案 0 :(得分:3)
我认为它是级联的。首先尝试设置常规订单路由:
routes: {
"": "main",
"!/order": "order",
"!/order/:id": "order"
},
答案 1 :(得分:2)
您可以通过使// Set font encoding to unicode always
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
// Then use the font with the most language support
XFont font = new XFont("Arial Unicode MS", 12, XFontStyle.Regular, options);
参数可选来简化路由器,因为两个订单路由的回调都相同。
:id