23 October 2012

Fix the position of the Blog Widgets


When we scroll  the blog page our right side widget get scroll to up.
If you want to fix the position of all the Widgets so if we scroll the
page Widget stay there at the same position.

1. go to the "Design" -> "Edit HTML"
2. If warning is there click on "Proceed"
3. Find the "/* Footer"













4. Paste following lines before the "/* Footer"

        /* Fix the position of all side bars
            by - Deepak  Sharma
           MyTacTics.blogspot.com
        ----------------------------------------------- */
        #sidebar-right-1
        {
            position:fixed;
            width:220px;
            top:60px;
        }





   















5. You can change the "width" and "top" attribute as per requirement.
    stay connected and enjoy.. :)

Remove "Title" column from Share Point 2010 list


This is all about how to remove the "Title" column
from SharePoint 2010 list

In actually  we can not delete it, but yes we can hide
it in such a way that It feels like, title column is deleted.
 
1. Select the List. Click on the "List" tab in top ribbon, followed by Click on "List Settings" then
   -> Advanced settings

2. Select the "Yes" Radio button for "Allow management of Content types",
    followed by "Ok" button










3. After clicking "Ok" button, you will get previous setting page. In that page
   under "Content Type" click on link named as "Item"














4.  Click on "Item" will give you a  new page, Here click on the "Title" column name.
   










5. On the new screen under the"Custom Setting" select the radio button with the
  text "Hidden (Will not appear in form)"











7. Now save all the changes by clicking "Ok" button. Go back to the list and add
  new Item, you will the screen like this. Title is there at screen but not in the entry form.

 8. If you still want to remove the title column from the page also follow the below step.

 9. Select your List. Click on the "List" tab in top ribbon, followed by Click on "Modify View".
 10. Select At this page you have to uncheck the check box with the title column.

 11. After un-checking the title column click on "Ok" at the bottom of the page, and now see "Title" column is not visible at the page as well as entry form.

















12. Its done. Happy coding.

22 October 2012

How To Run a "Dos Command" in c# code


Following code is to re - name  the folder user in command in C# code


// Create Command Here
                string commandToExecute = "ren \"New Folder\" \"Deepak Folder\"";

// Create the object of the Process
                System.Diagnostics.Process myProc = new System.Diagnostics.Process();
                myProc.StartInfo.UseShellExecute = false;
                myProc.StartInfo.RedirectStandardOutput = true;

// set the cmd.exe  file name of the Process
                myProc.StartInfo.FileName = "cmd.exe";

// set the command to execute   !! remember "/c" is must
                myProc.StartInfo.Arguments = "/c "+ commandToExecute;
                commandToExecute;
                myProc.Start();