June 6, 2016

Setup Selenium for .Net application

If you want to setup Selenium and want to get more information about it, visit below URL to get information about it.
http://www.seleniumhq.org/

Above Site provides all setup information about Selenium.
Once you download Selenium Standalone server, you have to start it.

To Start Selenium Standalone server use below command on command prompt.
You need to install Java latest version.

java –jar D:\Software\Selenium\selenium-server-standalone-2.53.0.jar.

February 13, 2016

Reset Sitecore Admin password to b

Use <Sitecore_Core_DB_Name>

 

UPDATE [aspnet_Membership] SET Password='qOvF8m8F2IcWMvfOBjJYHmfLABc='

WHERE UserId IN (SELECT UserId FROM [aspnet_Users] WHERE UserName = 'sitecore\Admin')

February 12, 2016

Convert JArray to List in C#

var response = client.Execute(request) as RestResponse;

JObject joResponse = JObject.Parse(response.Content.ToString());

 

JArray jArraylt = (JArray)joResponse["result"];

List<Student> students = JResult.ToObject<List<Student>>();

February 11, 2016

StyleCop code review tool

StyleCop tool can analyze C# code and can provide you suggestions where you can improve your code on the basis of style and consistence rules. It can be integrated with visual studio so you can run it inside your project. If you want to write clean code you can go through this.

Download link

February 10, 2016

Server.MapPath in Class Library C#

If you are using “Server.MapPath”  in assembly project, it will show you compilation error in application.To get rid of this issue, use “System.Web.HttpContext.Current.Server.MapPath” instead of “Server.MapPath”. You have to reference System.Web in your project.

February 9, 2016

Multiple update panel and multiple update progress

Below code snippet shows how we can use multiple update progress in ASP.Net application.

<asp:UpdatePanel ID="uPnlAction" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="dvWaring" runat="server">
   
<p>Multiple update panel and multiple update progress.</p>
</div>
<asp:UpdateProgress ID="uprUpgradation" AssociatedUpdatePanelID="uPnlAction"
      
runat="server">
<ProgressTemplate>
  Please wait …
<img alt="" src="/../Images/Processing.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>


<asp:UpdatePanel ID="upnlCase" runat="server"
      
UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<p></p>
<ProgressTemplate>
Please wait ...
<img alt="" src="/../Images/Processing.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>