Hi Nikhil,
This should work fine.Everything seems ok.But you didn't navigate the text after concatenation.
private void adrBarTextBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
getCurrentBrowser().Navigate(adrBarTextBox.Text);
}
else
{
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Enter)
{
adrBarTextBox.Text = "http://www." + adrBarTextBox.Text + ".com";
getCurrentBrowser().Navigate(adrBarTextBox.Text);
}
}
}
If this is not working.First just try the code and check whether the textbox text is concatenated after pressing Cntrl+Enter key
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Enter)
textBox1.Text = "http://www." + textBox1.Text + ".com";