在.net webform项目中用HyperLinkToUrl("www.abc.com/defualt.aspx?pbcommandparm=ABC ")的方式打开站点www.abc.com并且传递参数ABC
www.abc.com也是用pb开发的.net webform项目,open是用commandparm()接收ABC,如果ie中已经打开www.abc.com,则重新打开的www.abc.com只是第一个窗口的副本,而且无法执行open的commandparm()这句代码
请问这个问题有哪位遇到过,如何解决?多谢!!!
------解决方案--------------------
遇到过类似你的问题,只是类似。
我做法是先判断是否有IE打开了www.abc.com
用ul_Handle = FindWindowA(ul_Class, ls_title)
如果已经打开了,用ShellExecuteA(ul_Handle,'open',ls_url,ls_null,ls_null,0)
ul_Handle是已经打开的那个IE窗口的句柄,findwindowa返回的,ls_url是你想要跳转的ACTION
-----------------------------
FUNCTION ulong ShellExecuteA(ulong hwnd,ref string lpOperation,ref string lpFile,ref string lpParameters,ref string lpDirectory,ulong nShowCmd) LIBRARY "SHELL32.dll" ALIAS FOR "ShellExecuteA;Ansi"
-------------
PB11.5