使用C#在网站的搜索文本框中编写URL [英] Write a URL in the search textbox in a website with C#

查看:50
本文介绍了使用C#在网站的搜索文本框中编写URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在C#窗体中有一个文本框,当我在文本框中写一个URL并首先按"Going"按钮时,我要去那个网站,我的文本框写在那个网站的搜索文本框中,然后转到写的URL. /> 谢谢.

Hi,
I Have a text box in my form in C# I want when i write a URL in my text box and press Going button first I go to that website and my text box writed in that website search text box and go to writed URL.
thank you.

推荐答案



您将不得不使用类似的东西

Hi,

You''ll have to use some thing like this

Process.Start("http://abc.com");



///使用txtbox.Text代替abc.com



///use txtbox.Text instead of abc.com


在文本框中输入网站名称

write the website name in your textbox

textBox1.Text = "abc.com";





private void Button1_click(object sender, EventArgs e)
{
Process.Start("http://www."+textBox1.Text);//This opens in your default browser
}


这篇关于使用C#在网站的搜索文本框中编写URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆