private void showCategory_Load(object sender, EventArgs e)
{
string categoryId = "100"
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = categoryId;
}
how to pass string categoryId from form load to button click?
Thank you.
If it’s Windows Forms application than using the variable on the class level, not in the function
If it’s Web Application – store the value the some state callection: ViewState, Session, HiddenField and so on..