Revision: 4524
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 29, 2007 02:00 by zvasanth
Initial Code
public static string GetInputControlsNameAndValueInPage(string strPage) { string strRegExPatten = "<\\s*input.*?name\\s*=\\s*\"(?<Name>.*?)\".*?value\\s*=\\s*\"(?<Value>.*?)\".*?>"; Regex reg = new Regex(strRegExPatten, RegexOptions.Multiline); MatchCollection mc = reg.Matches(strPage); string strTemp = string.Empty; foreach (Match m in mc) { strTemp = strTemp + m.Groups["Name"].Value + "=" + m.Groups["Value"].Value + "&"; } int n = strTemp.Length; strTemp = strTemp.Remove(n - 1); return strTemp; }
Initial URL
ideabubbling.com
Initial Description
Everything is either true or untrue, or both true and untrue, or neither true nor untrue - nagarguna
Initial Title
Get Input Controls Name And Value In HTML Page
Initial Tags
regex, html, page
Initial Language
C#