I have a function for which I use a group of link buttons. function signature is similar:
protected void FunctionName(object sender, EventArgs e) { ... }
Now I have about 4-5 link buttons, which I use to call the same function, but just filter the material through the command argument, for example:
<asp:LinkButton ID="lbAll" runat="server" Text="All" CommandArgument="all" OnClick="FunctionName"></asp:LinkButton> <asp:LinkButton ID="lbTop" runat="server" Text="Top" CommandArgument="top" OnClick="FunctionName"></asp:LinkButton> (...)
Now I have a drop-down box that should do the same thing essentially (in just two of the selected values), I just need to call this function and pass the argument "all" or "top" to the function: "FunctionName"
this is in c #
I tried calling this function, for example
FunctionName(this, New EventArgs());
but I donβt know how to pass the argument?
Any ideas on this? Thanks!
source share