在我的网络应用程序中我有2个类别的下拉菜单...在按钮单击中我需要绑定来自与所选类别对应的数据库的URL ... 例如 我的网址----> http:// localhost:1232 / tollfree.aspx 我选择category1作为---->珠宝店 category2 as - ---> ABC钻石 按钮点击我的网址后应该是 http:// localhost:1232 / tollfree.aspx / abc-diamonds-toll-free-number 如何从数据库中绑定这个url? ?
解决方案试试这个: string AddValue = abc-diamonds-toll-free-number; // 假设abc-diamonds-toll-free-number来自数据库。 stirng absoluteURL = Request.Url.AbsoluteUri + / + AddValue;
现在您可以将应用程序重定向到 absoluteURL 。 使用:
Response.Redirect(absoluteURL);--Amit
in my web application i have 2 dropdowns for categories...in a button click i need to bind the url from database corresponding to the selected categories... For example my url----> localhost:1232/tollfree.aspx im selecting category1 as ---->Jewellery Shops category2 as ---->ABC Diamonds after button click my url should be localhost:1232/tollfree.aspx/abc-diamonds-toll-free-number how can i bind this url from database???
解决方案 Try this: string AddValue = "abc-diamonds-toll-free-number"; //Suppose "abc-diamonds-toll-free-number" is coming from database. stirng absoluteURL = Request.Url.AbsoluteUri + "/" + AddValue;Now you can redirect your application to absoluteURL. Use:
Response.Redirect(absoluteURL);--Amit
更多推荐
来自数据库的动态URL绑定
发布评论