Get Substring – everything before and after certain characters [closed]

You could use regular expressions, e.g: class Program { static void Main(string[] args) { var input = ” SUCCESS Post Policy Success INVOICE No. :: WS1704003404 || Policy No :: 59203313 || App No. :: 123456724 “; var pattern = @”::\s*(\w+)\s*”; var matches = Regex.Matches(input, pattern); foreach (Match match in matches) Console.WriteLine(match.Groups[1].Value); } }

How to get percentages of maximum counts?

SELECT TeamName, Count(TeamName) AS Count FROM table GROUP BY TeamName You need to use the Count Function – To count the team name And you need to use group by to determine how you want the counts to be grouped Edited Answer. SELECT TeamName, Count(DISTINCT CASE WHEN WorkInfo = 1 THEN SlNo end) AS Count1 … Read more

parameter passing while generating report in ASP.NET

Looks like SSRS ReportViewer control. You have 2 options: If you’re using default SSRS ReportViewer.aspx you can pass parameter through the URL, like that: http:///ReportServer/Pages/ReportViewer.aspx?PathToReport&rs:Command=Render&ExamYear=2013 If you’re using ReportViewer control directly, pass parameter in the codebehind: ReportParameter examYearParam = new ReportParameter(“ExamYear”, 2013); reportViewer1.ServerReport.SetParameters(examYearParam);