如何验证asp.net中的组合框 [英] How to validte the combobox in asp.net

查看:67
本文介绍了如何验证asp.net中的组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个字段,如下所示


柴油成本combobox1

柴油比率combobox2

当用户第一次运行时,首先要单击combobox2.如果假设当用户单击combobox1时,要显示消息为首先选择combobox2首先".


为此,如何在asp.net中编写代码.请帮助我.这是一个基于窗口的应用程序.

Reagards,
Narasiman P

i have two fields as follows


diesel cost combobox1

diesel rate combobox2

when user run first want to click the combobox2 first.if suppose when user clicks the combobox1 want to show the message as "first select the combobox2 first".


for that how to write the code in asp.net.please help me.it is a window based application.

Reagards,
Narasiman P

推荐答案

用于Windows应用程序,

if(comboBox2.Text ==")
messageBox.Show("Select ComboBox2 First");


写在第一个组合框的click事件上
for windows application,

if(comboBox2.Text=="")
messageBox.Show("Select ComboBox2 First");


write it on click event of first combobox


这篇关于如何验证asp.net中的组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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