Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个页面 MojiAlbumi.aspx 这行代码在哪里: href='Album.aspx?album="+id_galerija +"'
单击时,您会被重定向到 Album.aspx,我想在其中访问链接“Album.aspx?album='xxx'”中写入的值。如果可以将其保存在某个字符串中,我该怎么做?
是否只能通过获取链接并用正则表达式拆分它?
您可以使用
HttpContext c = HttpContext.Current; string album = c.Request["album"];
你可以使用它
Request.QueryString["album"]