本文介绍了使用C Sharp在Asp Dot Net中加载页面时,我需要在标签框中显示列的最大值(在表中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 使用c sharp在asp dot net中加载页面时,我需要在标签框中显示列的最大值(在表格中) 从master中选择max(refno + 1)。我是asp的新手,帮助while loading the page in asp dot net using c sharp, i need to display the maximum value of the column(in table ) in a label boxs alwaysSelect max(refno+1) from master.i am new in asp pls,help推荐答案 创建连接对象。 创建命令对象。 将相应的查询和连接分配给命令对象。 打开连接。 执行命令使用正确的 SqlCommand方法 [ ^ ]以获得结果。 然后使用标签绑定值。 Create Connection Object.Create Command Object.Assign appropriate query and Connection to the Command Object.Open the Connection.Execute your Command using proper SqlCommand Method[^] to get the results.Then bind value with the Label. 示例 ASP.Net中的DataBinding DropDownList标签和文本框控件 [ ^ ]。 这篇关于使用C Sharp在Asp Dot Net中加载页面时,我需要在标签框中显示列的最大值(在表中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-31 16:03