Webform URL 重新路由和会话变量
我们在与特定项目编号相关的 Excel 项目中生成 URL。 我们的主页 Project.aspx 正在加载会话变量 ID 以在网页上显示正确的值。
这是我们想要做的一个具体示例:
用户单击 Excel 电子表格中的链接,即: .../ProjectID=?12345
后面的网站代码检查ID并将其分配给会话 变量,然后加载我们的主页 Project.aspx
我怎样才能实现这一点?
谢谢。
We're spawning URLs in Excel projects tied to a specific project number.
Our main page Project.aspx is loading up the session variable ID to show the right values on the webpage.
So here's a concrete example of what we'd like to do:
The user clicks a link in an excel spreadsheet i.e.:
.../ProjectID=?12345The website code behind checks the ID and assigns it to the session
variable and then loads up our main page, Project.aspx
How can I achieve that ?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想要做的只是将查询字符串值保存到会话状态,那么这可能会有所帮助:
请注意,您的示例中有语法错误,但......
可能应该是:
If all you're trying to do is save a query string value to the session state, then this might help:
Note that you have a syntax error in your example, though...
should probably be: