devxlogo

February 16, 2017

Enhancing the WebBrowser control–do not use

The Webbrowser control does not show the notifications of the document like  a) downloading web page.. b) resolving proxy…  c) hyperlink url’s  You can quickly enable this by using the StatusTextChanged Event of the webbrowser control. It is a two-step process:  Step 1: Attach an event handler to the Webbrowser’s StatusTextChanged event, Like myWebBrowser.StatusTextChanged += new EventHandler(myWebBrowser_StatusTextChanged);  Step 2: Use the Webbrowser’s StatusText property to retrieve the current status notification. Create the event handler. private  void myWebBrowser_StatusTextChanged(object sender, EventArgs e)  {    //get the current status text from the webbrowser control  //and assign it to a control in the status bar.      statusStrip1.Text = webBrowser1.StatusText;  }

Generate Random Passwords

Use the following method to generate random passwords. private string GenerateRandomPassword(int minLength, int maxLength) { StringBuilder randomPassword = new StringBuilder(); Random rand = new Random((int)DateTime.Now.Ticks); int randLength = rand.Next(minLength, maxLength);

New Features in ASP.NET Core

ASP.NET Core is the latest Web application development framework from Microsoft. It is a significant redesign of the legacy ASP.NET framework and has already become widely popular. ASP.NET Core is