Now you have done a few things! found that a lot of stuff is universal. It's a lot of time to go through the previous examples and see what the code looks like and see how that function is implemented.
Now let's LinkButton the usage of the pass parameter.
This usage can be used to modify a product, delete a product when passing the parameter ID
The foreground code is as follows, if you want to bind the control data source.
<asp:linkbutton id= "Delete" runat= "server" text= "Delete this product" commandargument= ' <% #Eval ("ID")%> ' onclick= ' DEL_ Click "></asp:LinkButton>
CommandArgument is used to bind a passed parameter, and the code to get the parameter in the background is as follows
protected void Del_click (object sender, EventArgs e) {LinkButton alter = (LinkButton) sender;//delete is LinkButton ID ca_id = Convert.ToInt32 (alter.commandargument); }
This way, you can implement the parameters passed!!!! Write so much first, catch the code.
Ha ha... I just found a good thing.
It's about passing multiple values ...
CommandArgument = ' <% #Eval ("id") + "," +eval ("id")%> '
Remember, there is only one <%#%>