先说明一下我的系统:我用.net做了一个浏览器的小程序,用的axWebBrowser控件,浏览器固定访问的是本地机上的一个带有框架的网页,另做一个win的form1用来做搜索.1.如何在网页上点击的时候打开form1,里面是搜索程序.
2.如何在上面的窗口搜索到数据以后,要把结果显示到网页其中的一个框架里面...
2.如何在上面的窗口搜索到数据以后,要把结果显示到网页其中的一个框架里面...
解决方案 »
- 关于数据库操作的模板设置,以及需要该模板时如何使用?
- 联通+电信+服务器+网站
- 怎么我的存储过程没有返回值
- 急急急急急急急!!!!!!
- Math.Round 四舍五入
- 邮件发送和回复附加唯一信息
- (急)vs2005安装后工具箱里网站的控件变灰不能用了,应用程序的可以用?
- 如何修改一个快捷方式对于的图标?
- 请给我一盏明灯!!!!!!!!!!!
- 把数据填充到数据集后如何取得列名,不用数据集也行,只要能取得列名,不过不要用DATAGRID绑定后取列名,请教
- 把图片用二进制写到xml文件中,网页中的image控件能否显示xml文件中的图片?
- 运行asp.net(c#)时,出现应用程序中的服务器配置错误
有没有更好的方法,有没有可能实现我那种方法的..
axWebBrowser1.Navigate(@"http://localhost/PanpipeWeb/Test/SmartClient/WebForm1.aspx?ID=8");
文件1:EventTest.cs
using System;namespace Panpipe.Test.IEAbout
{
public delegate void EventFroIE(string id);
public class EventTest
{
public static EventTest Instance;
public event EventFroIE EventChangeUrl;
public virtual void OnEventChangeUrl(string id)
{
if(EventChangeUrl!=null)
EventChangeUrl(id);
}
static EventTest()
{
Instance =new EventTest();
}
public EventTest()
{
}
public void ToChangeUrl(string id)
{
OnEventChangeUrl(id);
}
}
}
文件2:Main.cs
public Main()
{
InitializeComponent();
EventTest.Instance.EventChangeUrl+=new EventFroIE(Instance_EventChangeUrl);
}
//重写Url,传递参数进去(更新你的框架用)
private void Instance_EventChangeUrl(string id)
{
axWebBrowser1.Navigate(@"http://localhost/PanpipeWeb/Test/SmartClient/WebForm1.aspx?ID="+id);
}
文件3:Pop.cs(在搜索后激发事件)
private void button1_Click(object sender, System.EventArgs e)
{
EventTest.Instance.ToChangeUrl("aa");
}