Hi, I have just started learning C# on my own and I am stuck somewhere. Here is the code.
In fact it's a web browser based on Web Browser control provided by C#. I just want to trigger the Go button when someone presses Enter Key after typing the url in Text Box i.e. txtUrl. Can anyone help me about this. I read somewhere that I can use e.KeyDown method but I don't know how to reach this function. A help would be highly appreciated. Thanks a lot.
Code:
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void btnGo_Click(object sender, EventArgs e)
{
webBrowser1.Navigate(txtUrl.Text);
}
Comment