/ Published in: C#
Everything is either true or untrue, or both true and untrue, or neither true nor untrue - nagarguna
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static string GetInputControlsNameAndValueInPage(string strPage) { string strRegExPatten = "<\\s*input.*?name\\s*=\\s*\"(?<Name>.*?)\".*?value\\s*=\\s*\"(?<Value>.*?)\".*?>"; 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; }
URL: ideabubbling.com