我正在使用ASP.net GridView。在选中复选框并单击搜索按钮之后,有一些复选框可以过滤结果。但是,我想删除按钮以在选中复选框后自动进行过滤。
gridview中显示的内容来自数据库表
ASP
#include <stdio.h>
#include <stdlib.h>
struct stackNode {
char letter;
struct stackNode *next;
int size;
};
void push(char data, struct stackNode **root) {
struct stackNode *new = malloc(sizeof(*new));
new->size = *root ? (*root)->size + 1 : 1;
new->letter = data;
new->next = *root;
*root = new;
}
char pop(struct stackNode **root) {
if (!*root || !(*root)->size) {
fprintf(stderr, "pop from empty stack\n");
exit(1);
}
char popped = (*root)->letter;
struct stackNode *cull = *root;
*root = (*root)->next;
free(cull);
return popped;
}
int main() {
struct stackNode *root = NULL;
push('c', &root);
push('v', &root);
push('n', &root);
while (root) {
printf("%c ", pop(&root));
}
puts("");
return 0;
}
C#
<b><label style="font-size:25px">Brand</label></b>
<asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="SBrand" DataValueField="SBrand">
</asp:CheckBoxList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" SelectCommand="SELECT DISTINCT [SBrand] FROM [Stock]"></asp:SqlDataSource>
答案 0 :(得分:0)
ASPX
library(stringr)
str_extract_all(formula, "[a-z]*_[0-9]*")
.CS
<asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="SBrand" DataValueField="SBrand" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged">