多种输入

编程入门 行业动态 更新时间:2024-10-11 21:25:24
本文介绍了多种输入-请建议我,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

请推荐我 名为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.

更多推荐

多种输入

本文发布于:2023-08-03 06:28:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1284829.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多种

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!