get Form Id from the Request in asp

839 views Asked by At

How can I get "form" ID from the posted Request? Is there a way to do it? Or just parameters are send? I have tried Request.["id"], but I just get the value of the parameter with that name. Request.Form[****]

1

There are 1 answers

0
Davy Quyo On

I think thats a weird question because as soon my page post data I already know which button got activate with calling the Sender in the function below

public void clickbutton(Control sender, EventArgs e)

from there its easy to determine which button got selected also by calling the

((Button)sender).ID

so if you know which button got triggered, you also know which form did a postback.