请推荐我 名为roll no的文本框,我希望您分配输入(111,222,333) 当我单击提交"按钮时,我必须获取所有三个卷号的详细信息. 甚至我想在存储过程中分配参数. 我该怎么办.给我一些想法.
kindly suggest me , text box named roll no , i want you assign input like (111,222,333) when i click on submit button , i have to get details of all three roll no. and even i want to assign the the parameter in stored procedure. how will i do this one . give me some idea . thanks in advance.
推荐答案分离输入很容易: Separating the inputs, is easy: string[] rolls = myTextBox.Text.Split(',');
卷"然后包含字符串数组:"111","222","333" 之后,我不知道您在说什么...
"rolls" then contains an array of strings: "111", "222", "333" After that, I have no idea what you are talking about...
您可以用'',''分割文本框文本,并获取每个rollno的记录. 或者您可以直接通过sql使用 You can split textbox text by '','' and fetch record for each rollno. or you can use by sql directly select *from Student where rollno in ("+textbox1.Text+");
并将数据列表与从上述查询中获取的数据绑定起来
and bind datalist with data fetched froma above query
使用 string[] abc =string_name.Split(',');
并在存储过程中使用字符串数组的每个元素(abc [0],abc [1],abc [2]).
and use each element(abc[0],abc[1],abc[2]) of string array in the store procedure.
更多推荐
多种输入
发布评论