Tuesday, December 31, 2013

Copy/Extract/Get DLL files from Global Assembly Cache (GAC)

If you need to Copy/Extract DLL files from Global Assembly Cache (GAC) under path %windir%\assembly or c:\windows\assembly


Open Run (Press Windows + R) and type %windir%\assembly\GAC_MSIL


Run

Select folder with dll name and you will find needed dll under folder named with Version__PublicKeyToken 

GAC File System

Thursday, December 26, 2013

Auto number column in GridView or DataList ASP.NET


You can do it by adding the flowing line of code on GridView ItemTemplate HTML

<%# Container.DataItemIndex + 1 %>


Example:

<asp:GridView ID="GridView1" AutoGenerateColumns="true" runat="server">
    <Columns>
        <asp:TemplateField HeaderText="Sequence">
            <ItemTemplate>

                <%# Container.DataItemIndex + 1 %>

            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>


Sign in as different user on SharePoint 2013


"Sign in as Different User" menu option is missing in SharePoint Server 2013

To work around this issue you can access your SharePoint site using below link

http://{SiteURL}/_layouts/closeConnection.aspx?loginasanotheruser=true

Note: Currently this option does not work in IE 10 and Safari.

Sunday, July 11, 2010

Execute Java Script Function After AJAX Request

The Follwing JS Code on 'endRequest' Function Will Be Execute After AJAX Request
Ex: After Submitting ASP.NET Form

function pageLoad() {
var manager = Sys.WebForms.PageRequestManager.getInstance();
manager.add_endRequest(endRequest);
}
function endRequest(sender, args) {

//Add Your JS Code Here
window.scrollTo(0, 300);
}

Check ASP.NET Page If Valid Using JavaScript

Check ASP.NET Page If Valid (All Validating Form Input Controls Are Valid) Using JavaScript

function ValidatePage() {
if (typeof(Page_ClientValidate) == 'function') {
Page_ClientValidate();
}
if (Page_IsValid) {
//Add Your JavaScript If Page Valid.
document.getElementById('divCaution').style.display = 'none';
}
else {
//Add Your JavaScript If Page Not Valid.
document.getElementById('divCaution').style.display = 'block';
}
}