多种输入-请建议我, [英] multiple input - kindly suggest me ,

查看:95
本文介绍了多种输入-请建议我,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请推荐我

名为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.


这篇关于多种输入-请建议我,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆