Sunday, 22 July 2012

How to get the value hidden control of user control in .aspx page

 

In .ascx file(UserControl1)

<script type="text/javascript">
    $(function () {
        $('.address-radio').change(
            function () {
                $('#<%=AddressHidden.ClientID %>').val($(this).val())
                            }
        )
    })
</script>

<asp:HiddenField ID="AddressHidden" runat="server" />

In aspx page

HiddenField hidden = (HiddenField)UserControl1.FindControl("HiddenField1");
        if (hidden != null)
        {
            string value = hidden.Value.ToString();
        }

http://forums.asp.net/t/1369427.aspx

Wednesday, 27 June 2012

Deploying SharePoint Package with stsadm

 

path C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN
stsadm -o retractsolution   -name InformationCenter.wsp -immediate -url http://sharepointSiteUrl

stsadm -o execadmsvcjobs

path C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN
stsadm -o deletesolution   -name InformationCenter.wsp

path C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN
stsadm -o addsolution -filename "c:\InformationCenter.wsp"
stsadm -o deploysolution -name InformationCenter.wsp -url http://sharepointSiteUrl -immediate -allowgacdeployment

stsadm -o execadmsvcjobs

Friday, 22 June 2012

UpdatePanel initializeRequest and endRequest

$(document).ready(function() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandle);
            Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initializeRequest);
            var postBackElement = "";
            function initializeRequest(sender, eventArgs) {
                postBackElement = eventArgs.get_postBackElement().id;
            }
           
            function endRequestHandle(sender, args) {
                if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack())
                    // Do something…                   
            }
        });

Tuesday, 19 June 2012

asp.net tab doesn't show in iis

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;^ IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;^ IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;^ IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;^ IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;^ IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;^ IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;^ IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;^ IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;^ WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;^ WCF-NonHTTP-Activation