Header

Sunday, 8 January 2012

Share point login

You may notice that the login control (or welcome control) is actually inside the ribbon by default in SharePoint 2010. You'll probably want to pull this control out of the ribbon and place it elsewhere on your page. Just look for the line of code that looks like this:

<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false"/>


Move this code out of the ribbon and into another location within your master page. Save your changes, check in and approve all files, and anonymous users will never know your site is built on SharePoint 2010!

Friday, 6 January 2012

Working with CollapsiblePanelExtender

 This post has been moved to this link

http://unique2026.blogspot.in/2013/08/working-with-collapsiblepanelextender.html

Tuesday, 13 December 2011

SharePoint page mode(Edit/Not Edit)


We can check page mode by this value.
If it is one then page is in edit mode.
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
document.forms[0].elements["MSOLayout_InDesignMode"].value
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Thanks and Regards

Saturday, 3 December 2011

Insert data using SPAPI

We need to call this function for adding content in lis..
function Feedbackadd()
   {
            var regad_var = $("#regad1 option:selected").text();
            \\ Get the value from one DropDown list that id is regad1
            var sub_var = $("#sub1").attr('value'); 
           \\ Get the value from one text box that id is sub1.
            var name_var = $("#name1").attr('value');
            \\ Get the value from one text box that id is name1.
            var email_var = $("#email1").attr('value');
            \\ Get the value from one text box that id is email1.
            var msg_var = $('#textareamsg1').val();
             \\ Get the value from one text box that id is textareamsg1.
            var lists = new SPAPI_Lists('listLocationt');
            \\ Give the location of document where Feedback list is there.
            var res = lists.quickAddListItem('Feedback', { Title:sub_var, Regarding:regad_var, Subject:sub_var, Name:name_var, Email:email_var, Message:msg_var });
      
         if (res.status == 200)
            {
                alert('Thank you for Feedback.');
              }
            else
            {
                alert('Unexpected error.');
            }
          
        }


Thanks ....................:-) 

How to Register User Control

There are 2 way to register a user control in asp page.
  1. Register in asp page on top
  2. Add in web.config file
To register a user control in aspx page we need to add
<%@ Register TagPrefix="adms" TagName="Student" src="~/StudentDetails" %>

We can register our user control in web.config file. By this way we can use our user control anywhere in our solution, no need to register on every page manually. For doning this we need to modify our web.config file

<?xml version="1.0"?>
  <configuration>
    <system.web>
   <pages>
     <controls>
    <add tagPrefix="adms" src="~/Controls/StudentDetails" tagName="Student"/>
    <add tagPrefix="ControlVendor" assembly="ControlVendorAssembly"/>
     </controls>
   </pages>
    </system.web>
  </configuration>

***********************
But when we register our user control in web.config file we need to check location of user control bcz we cant keep both (web.config, user control) at same locaion
  ******************

If want to use this user control we can use like below
<adms:Student id="show" runat="server" />


Thanks

Friday, 2 December 2011

Position Change on Hover

For doing this we need two image. 
Fist one will be visible bydefault and scecond will appear on hover.
Now we need to add both image in single image, on top part add default image and in bottom part add hover image.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#onHover_adms a{
background:url("previous.png") 0 0 no-repeat;
font-size:25px;
padding-right:18px;
}
#onHover_adms a:hover{
background-position:0px -29px;
}

<div id="onHover">
<a href="#">&nbsp;</a>
</div>

Thanks........................

Friday, 25 November 2011

How to Decode URL

//////////////////////////////////////////////////////////

var new1="http://www.abc.com/About%20Us/Pages/Default.aspx";
var newe=decodeURI(new1);
alert(newe);
//////////////////////////////////////////////////////////


This is for encoding the url
var newe=encodeURI(new1);

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
We can decode url or Querystring by server side code

Dim _queryString As String = HttpUtility.UrlDecode(Request.QueryString().ToString())

now _queryString will hold decoded value
Thanks.....