开发者

get special value in url

url:http://localhost:51806/fair/PersonPage/personalPages.aspx?idCompany=1338006699#Site/AboutAs

request["idCompany"];

this code return null

how can get value idCompany

EDIT

 Request.UrlReferrer.Query

this return ?idCompany=1338006699

this Request.UrlReferrer.Query.Split('=')[1] return 1338006699

but i think this way does not good way

#Site/AboutAs is a tab aboutA开发者_运维知识库s in full tab component


Try this instead:

string id = Page.PreviousPage.Request.QueryString["idComapny"];

If no luck then your method of splitting is the best you can achieve, as you're trying to read the query string of the referrer page.

One work around though is to store the value in that previous page.

To do this, store the value of Request["idComapny"] in the previous page, where it should be available, in Session then you can read the Session value in any other page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜