StanleyGu's Blog
.NET Consultant C# ASP.NET SQL Server Silverlight
-
Tip 9 : Windows Authentication Is Missing in IIS 7.0
I deployed my silverlight 3.0 application to IIS 7.0 on Windows Server 2008 and could not find Windows Authentications. It is an intranet application and only corporate windows domain users are allowed to access the application, thus windows authentication needs be used.
-
Tip 8 : IsDate() function in C#
C# does not provide IsDate() function, but you can build one pretty easily:
-
Tip 7 : Invalid Directory? Use Cmd instead of Command
At your windows xp computer, click Start, point to and click Run. then type: command and click OK. Now you are in the command prompt screen.
-
Architect 2 : Calling WCF Services in Your Data Access Layer
After you have completed an N-tier Silverlight application (check my blog: http://weblogs.asp.net/stanleygu/archive/2009/12/20/building-n-tier-silverlight-application.aspx ), your company decides to outsource sql server database development and management to a third party vendor. In your data access layer, instead of calling the sql server database directly, you will need to call the WCF services provided by the vendor.
-
Tip 6 : Function returning SqlDataReader Type
I am strongly against building a function that returns SqlDataReader type because it destroys the basic purpose of building a function: decoupling or separation of concerns. For SqlDataReader, an active database connection needs be kept open across your function to the client that calls the function.
-
Tip 5 : The name ‘ErrorMessageLabel’ does not exist in the current context
At Siverlight application test page, you add an ASP.NET label control:
-
Architect 1 : Building N-Tier Silverlight Application
You have a Customer table with fields of LastName and FirstName, and want to use Silverlight DataGrid to display all the records. To implement this, You can use N-tier application architect.
-
Solution 4 : Export Silverlight DataGrid to Excel XML
While ASP.NET GridView control supports data export to Excel, Silverlight DataGrid control does not. To implement the data export, you need to retrieve data from the DataGrid and write the data to an Excel XML file (Office Open XML File Format).
-
Tip 4 : Microsoft Office Excel XML : Use the Correct DateTime Format to Avoid Error
The correct format for DateTime data type in an Excel XML cell is yyyy-MM-ddTHH:mm:ss.fff. Using other formats will give you an error of The file cannot be opened because of errors when you open the Excel xml file.
-
Tip 3 : Double Quotation Marks in String: Using C# Escape Sequence
You have the following sentence that has double quotation marks: