Hi,
I have a grid and a webbrower control on a form. When I will
click on any record in the grid, a function composes the url as per the
user's session id and the url should be navigated in the webbrower
control.
here is my code --
string _url = ComposeChatScriptPageUrl(_sessionId);
//_url value i get here is http://localhost/web/ChatScript.aspx?sid=4wil4355awmve4fk0p02aqeg
browersCntrl.Navigate(_url);
browersCntrl.Refresh();
but it's not navigating the page, even after browersCntrl.Navigate(..) I can see browersCntrl.url is null (?)
I can view ' http://localhost/web/ChatScript.aspx?sid=4wil4355awmve4fk0p02aqeg' in a browser with proper data.
For a trial i tried --
chat_browersCntrl.Url =new Uri("http://www.google.co.in");
but still after executing this statement , chat_browersCntrl.Url is null (surprising !! )
Can anybody help me out.. it's urgent !!!!
Loading

Subramanyam RompicherlaRank #4,887 · 320 reputationPosted Jun 24, 2009, 12:18 AM EDT
i checked your code and used in a sample
//string _url = ComposeChatScriptPageUrl(_sessionId);
//_url value i get here is http://localhost/web/ChatScript.aspx?sid=4wil4355awmve4fk0p02aqeg
browersCntrl.Navigate("www.google.com"); //remove the browser control refresh property
//browersCntrl.Refresh();
here you are refreshing the control, so the control again its loadingi hope it will be work, if its not working please let me know
Tejaswini Prashant J78 reputationPosted Jun 24, 2009, 3:12 AM EDT
Thnks for ur answer! I corrected it n working fine nw :)
Btw I have one more question..
I want to set the webbrower control's scroll bar at bottom always
I tried with ...
private void browersCntrl_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
browersCntrl.Document.Window.ScrollTo(0, int.MaxValue);
}
but it's not working in my case..
Can u help me?
Subramanyam RompicherlaRank #4,887 · 320 reputationPosted Jun 24, 2009, 9:49 AM EDT
please check below link, it will be helpful for you,
http://social.msdn.microsoft.com/forums/en-US/winforms/thread/74694382-dc0d-4824-ac8f-3a4046f45111