public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
protected void mobjSubmitButton_Click(object sender, EventArgs e)
{
LinkParameters objLinkParameters = new LinkParameters();
objLinkParameters.Target = "ReceivingFrame";
objLinkParameters.Location = new Point(0, 0);
objLinkParameters.Size = new Size(640, 480);
string strArgs = this.mobjSearchTextBox.Text;
if (!String.IsNullOrEmpty(strArgs))
{
strArgs.Replace((char)9, (char)32); // Replace Tab with space
strArgs = this.RemoveDuplicateSpaces(strArgs);
string[] arrArgs = strArgs.Split(new char[] { (char)9, (char)10, (char)13, (char)32 });
for (byte bytIndex = 0; bytIndex < arrArgs.Length; bytIndex++)
{
objLinkParameters.Form["prm" + bytIndex.ToString()] = arrArgs[bytIndex];
}
}
Link.Open("http://localhost:1490/Post.Form1.wgx", objLinkParameters);
}
protected virtual string RemoveDuplicateSpaces(string strString)
{
while(strString.Contains(" "))
{
strString = strString.Replace(" ", String.Empty);
}
return strString;
}
}