About Me

My photo
a Dynamic and Energetic guy.....

Wednesday, August 31, 2011

SharePoint Credential Popup disabling

It was a so much trouble to me when working SharePoint to give "Credentials" always. Even we are not thinking about it, it takes considerable amount of time. So i have decided to avoid from it. 

Internet Explorer --> Internet Options --> Security --> Trusted Sites --> User authentication


Wednesday, August 17, 2011

How to Open a DataSet using Microsoft Excel in a web application

protected void btnExportExcel_Click(object sender, EventArgs e)
        {
            DataSet ds = CurrentApproverService.GetReportData(depID, UserID);

            DataGrid dg = new DataGrid();
            dg.DataSource = ds;
            dg.DataBind();

            Response.ClearContent();
            Response.AddHeader("content-disposition", "attachment; filename=" + "ReportData.xls");
            Response.ContentType = "application/excel";
            System.IO.StringWriter sw = new System.IO.StringWriter();
            HtmlTextWriter htw = new HtmlTextWriter(sw);
            dg.RenderControl(htw);
            Response.Write(sw.ToString());
            Response.End();

            dg = null;
            dg.Dispose();
        }

Monday, August 8, 2011

How SharePoint 2010 Installation creates SQL Sever DataBases

I was able to get step by step screen shots of,
SharePoint 2010 installation Vs. SQL Server DB creation

                                                      (1) Initial DB structure


(2) While SharePoint 2010 Installing

(3) Step 3 of  "SharePoint 2010 product configuration" is the main step that creates "Config" database

(4)  When "Configure SharePoint Farm" using Central Administration

(5) SQL DB structure while running wizard

(6) After Configured All Services in "SharePoint 2010"
It is Easy And Structured :)


Localization in SharePoint

It was a horrible week for me, because of a too critical task, i.e.LOCALIZATION

Finally i was able to do it :) :) :)

*** Added "ChanaApp.resx" to App_GlobalResources folder in [Port] folder
*** Added "ChanaApp.nl.resx" to same folder
*** Added a label to .ASPX page
*** Set the Expression of the label, set the TEXT property using "Resources"

*** If only one page we can use
 protected override void InitializeCulture()
        {
            string[] languages = HttpContext.Current.Request.UserLanguages;
            string language = languages[0].ToLowerInvariant().Trim();

            string selectedLanguage = language;
            Thread.CurrentThread.CurrentCulture =
                CultureInfo.CreateSpecificCulture(selectedLanguage);
            Thread.CurrentThread.CurrentUICulture = new
                CultureInfo(selectedLanguage);
            base.InitializeCulture();
        }

*** If for total web application then we have to use
protected void Application_BeginRequest(object sender, EventArgs e)
        {
            string[] languages = HttpContext.Current.Request.UserLanguages;
            string language = languages[0].ToLowerInvariant().Trim();
            string selectedLanguage = language;
            Thread.CurrentThread.CurrentCulture =
                CultureInfo.CreateSpecificCulture(selectedLanguage);
            Thread.CurrentThread.CurrentUICulture = new
                CultureInfo(selectedLanguage);
        }
in GLOBAL.ASAX file.
*** Change the Culture of browser will change the TEXT in the label

My Masters