Month: May 2010

String Contains Method with StringComparison

if a string contains another string ignoring the case, there is no method available for string with ignore case we can create extension to string using following ! public static bool Contains(this string original, string value, StringComparison comparisionType) { return original.IndexOf(value, comparisionType) >= 0; } Happy coding...

Read More

Export File Name in SSRS Report Viewer

In Sql Server Reporting Services ReportViewer control, if one needs to setup default file name for Export then in page_load or other appropriate event following line of code will workout setting up the file name ! ReportViewerControl.ServerReport.DisplayName = “YOUR DESIRED...

Read More

Report Viewer Page Height and Browser

When Reportviewer page viewed in Firefox or Google Chrome ( Non IE Browsers) sometime it doesn’t load properly , that is just because of DOCTYPE Tag of aspx Page <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> Remove DOCTYPE Tag and add following property to Reportviewer will solve the issue of page height For some case it works by adding AsyncRendering=”False” In certain situation it works  using SizeToReportContent =...

Read More