Q
Problem solve Get help with specific problems with your technologies, process and projects.

Opening a link with parameters to a new window

How do I open a link with parameters to a new window? For example, in a search page, when a user gives the search criteria, the output should be shown in new window.
In Windows, you have to code the LinkLabel.LinkClicked event in order for it do something. When you create the new form that will be opened, you can pass arguments to it in its constructor, like any other class. You just have to create an additional constructor in your form that knows how to process that data:
public MyForm : Form
{
  public MyForm(string searchedFor, int maxCount ....)
  {
      // Use these values to customize the UI or get results.
  }
}
This was last published in November 2004

Dig Deeper on C# programming language

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

SearchCloudApplications

Close