Detect WebBrowser Name

private string DetectWebBrowserName()
 {
 try
 {
 System.Web.HttpBrowserCapabilities browser = Request.Browser;
 if (browser != null)
 {
 // Return the web browser name e.g. IE or Chrome.
 return browser.Browser;
 }
 else
 {
 return "Warning: The web browser capabilities cannot be detected!";
 }
 }
 catch (Exception exception)
 {
 // E-mail the exception message to the development team.
 string body = "<html><body>An error occurred in DetectBrowser():<br/>" + exception.ToString() + "<br/></body></html>";
 this.SendAlertEmail(body);

return "Error: The web browser cannot be detected!";
 }

/*
 string browserCapabilities = "Browser Capabilities\n"
 + "Type = " + browser.Type + "\n"
 + "Name = " + browser.Browser + "\n"
 + "Version = " + browser.Version + "\n"
 + "Major Version = " + browser.MajorVersion + "\n"
 + "Minor Version = " + browser.MinorVersion + "\n"
 + "Platform = " + browser.Platform + "\n"
 + "Is Beta = " + browser.Beta + "\n"
 + "Is Crawler = " + browser.Crawler + "\n"
 + "Is AOL = " + browser.AOL + "\n"
 + "Is Win16 = " + browser.Win16 + "\n"
 + "Is Win32 = " + browser.Win32 + "\n"
 + "Supports Frames = " + browser.Frames + "\n"
 + "Supports Tables = " + browser.Tables + "\n"
 + "Supports Cookies = " + browser.Cookies + "\n"
 + "Supports VBScript = " + browser.VBScript + "\n"
 + "Supports JavaScript = " +
 browser.EcmaScriptVersion.ToString() + "\n"
 + "Supports Java Applets = " + browser.JavaApplets + "\n"
 + "Supports ActiveX Controls = " + browser.ActiveXControls
 + "\n"
 + "Supports JavaScript Version = " +
 browser["JavaScriptVersion"] + "\n";
 */
 //this.SendAlertEmail(browser.Browser);
 } //DetectWebBrowserName()



private bool OpenDocument(string fileName)
 {
 try
 {
 // Get the file name without the path.
 string fileNameWithoutPath = Path.GetFileName(fileName);

// Detect the web browser name: Chrome or Internet Explorer?
 string browserName = this.DetectWebBrowserName();

if (browserName.Equals("InternetExplorer") || browserName.Equals("IE"))
 {
 // Open the solution document file in a new IE browser tab:
 ScriptManager.RegisterClientScriptBlock(Page, typeof(string), "OpenedSolutionDocumentFile", "var solutionDocumentFile=window.open('documents/" + fileNameWithoutPath + "');", true);
 }
 else if (browserName.Equals("Chrome"))
 {
 // Open the solution document file in a new Chrome browser tab:
 ScriptManager.RegisterClientScriptBlock(Page, typeof(string), "OpenedSolutionDocumentFile", "var solutionDocumentFile=window.open('documents/" + fileNameWithoutPath + "','_blank'); solutionDocumentFile.focus();", true);
 }
 else
 {
 //Neither IE nor Chrome: very unlikely case.
 // TODO: Firefox
 }
 return true;
 }
 catch (Exception exception)
 {
 // E-mail the exception message to the development team.
 string body = "<html><body>An error occurred in OpenDocument():<br/>" + exception.ToString() + "<br/></body></html>";
 this.SendAlertEmail(body);

return false;
 }
 } //OpenDocument()

How to call ASP.NET server side button click event from javascript?( ASP.NET interview questions with answers)

https://www.dotnetinterviewquestions.in/article_how-to-call-aspnet-server-side-button-click-event-from-javascript-aspnet-interview-questions-with-answers_179.html

function __doPostBack( eventTarget, eventArgument )

    document.Form1.__EVENTTARGET.value = eventTarget;

    document.Form1.__EVENTARGUMENT.value = eventArgument;

document.Form1.submit();

}

Azure Data Architecture Guide

https://docs.microsoft.com/en-us/azure/architecture/data-guide/?lipi=urn%3Ali%3Apage%3Ad_flagship3_feed%3B5SdjHZZFTU67gv9jks9UHg%3D%3D&licu=urn%3Ali%3Acontrol%3Ad_flagship3_feed-original_share_object

D365 London 2018

All the best for you all in New Year 2018!

I am delighted to announce my presentation “Solving Complex integration scenarios with SSIS” on next CRM Saturday in London Paddington on 27th January (15.00 – 16.00). I am looking forward to see some of you there. Here is url to event registration page:

http://365saturday.com/dynamics/london-jan2018/

Tickets are free, although spaces are limited to the first 100 Registrants.

Event will be headed up by:
James Philips – Corporate Vice President, Microsoft
Ben Volmer – Global Field Service lead, Microsoft
Nick Delacamp – Vice President of CafeX Communications

Thinking

“Thinking is difficult, that’s why most people judge.”

C.G. Jung

I have heard new version of this quote:

“Thinking is difficult, that’s why most people avoid it.”