如何创建随机数

编程入门 行业动态 更新时间:2024-10-28 00:27:51
本文介绍了如何创建随机数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在Gridview记录如下 Companyid公司名 选择1 SK 选择2 MR 当我点击gridview中的第一行选择按钮时,显示如下记录 Companyid 1(textbox1) companyname SK(textbox2) 当我点击gridview中的第二行选择按钮时,显示如下记录 Companyid 2(textbox1) companyname MR(textbox2) 我想在textbox2中的companyname中显示随机数。 在textbox2我希望输出如下SK34535 simliarily为textbox2中的第二家公司我希望输出如下MK43532。 for that怎么样我在asp中使用c#。

In Gridview record as follows Companyid Companyname select 1 SK select 2 MR When i click the first row select button in gridview display the record as follows Companyid 1 (textbox1) companyname SK (textbox2) simliarily when i click the second row select button in gridview display the record as follows Companyid 2 (textbox1) companyname MR (textbox2) I want to display random number in companyname in textbox2. In the textbox2 i want output as follows SK34535 simliarily for the 2nd company in the textbox2 i want output as follows MK43532. for that how can i do in asp using c#.

推荐答案

我会阅读文档:Random.Next Method(Int32,Int32)[ ^ ]。

在c#中有很多algos生成随机数。在Google或Bing中搜索并查看哪一个最符合您的要求。 实施。如果您在执行此操作时遇到任何特定问题,请访问此处并提出另一个问题,说明有关您的代码的所有详细信息。 There are many algos to generate random numbers in c#. Search in google or Bing and see which one best suits your requirements. Implement that. If you face any specific issue while doing that, come here and ask another question describing all the details about your code.

更多推荐

如何创建随机数

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

发布评论

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

>www.elefans.com

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