Monday, 8 June 2015

Convert wsdl file to class file

Steps to convert wsdl file to class file

  • Find the Web Services Description Language Tool (WSDL.exe). This file comes with .net framework. So if you already install .net Framework you will get this exe in you machine. Here is a probable location of wsdl.exe "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64"
  • Go to the exe file location and open command prompt and type below command. "wsdl /out:myProxyClass.cs http://soap.proofhq.com/15_6_0/soap.wsdl". Like wsdl {output class file} {wsdl file path}

Tuesday, 19 May 2015

Firefox scrollbar issue based on height

There is a weird problem in firefox regarding scrollbar. If a div heights is 30px or less, then overflow-y  style will not work any more in firefox.
So the resolution is increase the div height, say for example 40px. It will work properly.

Monday, 22 July 2013

CSS3 Pseudo Classes: first-of-type, last-child, first-child and last-of-type

  • first-of-type: It selects first element of same type. This is similar to first-child, which was introduced in CSS2. In practice, however, they are as different as nth-child and nth-of-type. 
            <div>
                <h2>Wuthering Heights</h2>
                <p>I have just returned...</p>
                <p>This is certainly...</p>
                <p>In all England...</p>
                <h3>By Emily Bronte</h3>
            </div>
       p:first-of-type { font-style: italic; }
       Result: I have just returned...
  • first-child: It selects the first element of the parent. If i use above div element example.
      p:first-child {text-decoration: underline;}
      Result: no element will be selected.
      if i remove <h2>Wuthering Heights</h2> element then it will select <p>I have just returned...</p>

     last-of-type &  last-child will work in the reverse way. It will select last element of same type and last element of the siblings accordingly.

CSS3 pseudo classes: Difference between only-child and only-of-type

  • Only-child: Select elements of the document tree if parent have have only one child means there is no siblings.
        <div>          
                <p>I have just returned.</p>               
        </div>
        p:only-child { text-decoration: underline; }

  • Only-of-type: Selects elements of the document tree if parent have no siblings of same type.
            <div>
                <h2>Wuthering Heights</h2>                
                <p>In all England...</p>
                <h3>By Emily Bronte</h3>
            </div>
           p:only-of-type { font-style: italic; }

Thursday, 18 July 2013

Retrieve App pool password.

If you forget password of app pool, it is very difficult to retrieve password. There is a simple command for this. Just go to you command prompt and type below command:

C:\Windows\System32\inetsrv\appcmd.exe list apppool -config

It will return a XML file.

Monday, 28 November 2011


Set "!important" style by JavaScript

It is very easy to set style in any DOM element by Javascript like:

var target = document.getElementById('MyDiv');
target .style.marginleft ="100px";

But if you want to add "!important" like this -

target .style.marginleft ="100px !important";
this will not work.

Use this code to get it done.
target.setAttribute('style', 'margin-left:200px !important');

Sunday, 25 July 2010

Tab Control in Silverlight

Silverlight tab control is very easy to use. Drag and drop the control on .xaml page. You can change various property of tab control like height, width, background etc. It has various events also. There is place holder around the tab control. To make it void make the border thickness property zero. It took bit time to fix this problem. Tab control contain tab item. Numbers of tab items are added as it is require. 
Tab Items may contain border for beautification. One important thing we need in page that is scroll viewer when page become large. We can add scroll viewer within tab item. 

<controls:TabControl x:Name="tbBuilder" Height="auto" Width="auto" BorderThickness="0"
                  Background="Transparent" SelectionChanged="tbBuilder_SelectionChanged" Margin="0,9,0,0">

                    <!--General-->
                    <controls:TabItem x:Name="tbItemBuilderInformation" Header="Information" Margin="5,0,0,0">
                            <Border  BorderThickness="1,1,1,1" BorderBrush="Black" Height="auto" Width="auto" Background="White"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                                <StackPanel x:Name="stkPnlBuilderInformation" Height="auto" Width="auto"></StackPanel>                       
                            </Border>
                    </controls:TabItem>
               
                <!--Logo-->
                    <controls:TabItem x:Name="tbItemBuilderLogo" Header="Logo and Video">
                        <Border  BorderThickness="1,1,1,1" BorderBrush="Black" Height="auto" Width="auto" Background="White"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                            <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"  BorderThickness="0" Margin="0" Height="auto" Style="{StaticResource ScrollViewerStyle1}" >
                                <StackPanel x:Name="stkPnlBuilderLogo" Height="auto" Width="auto"></StackPanel>
                            </ScrollViewer>
                        </Border>
                    </controls:TabItem>
</controls:TabControl>

In the above example we used stackpanel inside tab item. Now we can load xaml page in stack panel. There is various ways to code with tab control.