itemvalidationerroronimport的简单介绍

http://www.itjxue.com  2023-02-12 14:22  来源:未知  点击次数: 

ImageSwitcher配合Gallery问题,eclipse上说是ImageSwitcher.setFactory(this)这里的问题,求高手提点。

is.setFactory(factory);这个方法里面的参数的ViewFactory类型的,你用this,指的是activity,类型不对,当然会报错,解决办法:

is.setFactory(new ViewFactory() {

@Override

public View makeView() {

// TODO Auto-generated method stub

ImageView temp = new ImageView(this); //这里是添加一个imageview,用来配合gallery显示当下gallery选择的图片,你一可以写成别的

return temp;

}

});

下载老是出现Download failed是怎么回事.下载不了

我觉得有几种可能:一,所下载的文件没有合适的候选资源,导致下载无法完成;二,杀毒软件或防火墙限制,导致下载无法完成;三,部分资源只对会员或注册用户服务,导致不能下载;四,网络连接问题,导致下载无法完成。

VBA—Application.Dialogs

名称值说明

xlDialogActivate103“激活”对话框

xlDialogActiveCellFont476“活动单元格字体”对话框

xlDialogAddChartAutoformat390“添加图表自动套用格式”对话框

xlDialogAddinManager321“加载项管理器”对话框

xlDialogAlignment43“对齐方式”对话框

xlDialogApplyNames133“应用名称”对话框

xlDialogApplyStyle212“应用样式”对话框

xlDialogAppMove170“AppMove”对话框

xlDialogAppSize171“AppSize”对话框

xlDialogArrangeAll12“全部重排”对话框

xlDialogAssignToObject213“给对象指定宏”对话框

xlDialogAssignToTool293“给工具指定宏”对话框

xlDialogAttachText80“附加文本”对话框

xlDialogAttachToolbars323“附加工具栏”对话框

xlDialogAutoCorrect485“自动校正”对话框

xlDialogAxes78“坐标轴”对话框

xlDialogBorder45“边框”对话框

xlDialogCalculation32“计算”对话框

xlDialogCellProtection46“单元格保护”对话框

xlDialogChangeLink166“更改链接”对话框

xlDialogChartAddData392“图表添加数据”对话框

xlDialogChartLocation527“图表位置”对话框

xlDialogChartOptionsDataLabelMultiple724“图表选项多个数据标签”对话框

xlDialogChartOptionsDataLabels505“图表选项数据标签”对话框

xlDialogChartOptionsDataTable506“图表选项数据表”对话框

xlDialogChartSourceData540“图表源数据”对话框

xlDialogChartTrend350“图表趋势”对话框

xlDialogChartType526“图表类型”对话框

xlDialogChartWizard288“图表向导”对话框

xlDialogCheckboxProperties435“复选框属性”对话框

xlDialogClear52“清除”对话框

xlDialogColorPalette161“调色板”对话框

xlDialogColumnWidth47“列宽”对话框

xlDialogCombination73“组合图”对话框

xlDialogConditionalFormatting583“条件格式”对话框

xlDialogConsolidate191“合并计算”对话框

xlDialogCopyChart147“复制图表”对话框

xlDialogCopyPicture108“复制图片”对话框

xlDialogCreateList796“创建列表”对话框

xlDialogCreateNames62“创建名称”对话框

xlDialogCreatePublisher217“创建发布者”对话框

xlDialogCustomizeToolbar276“自定义工具栏”对话框

xlDialogCustomViews493“自定义视图”对话框

xlDialogDataDelete36“数据删除”对话框

xlDialogDataLabel379“数据标签”对话框

xlDialogDataLabelMultiple723“多个数据标签”对话框

xlDialogDataSeries40“数据系列”对话框

xlDialogDataValidation525“数据有效性”对话框

xlDialogDefineName61“定义名称”对话框

xlDialogDefineStyle229“定义样式”对话框

xlDialogDeleteFormat111“删除格式”对话框

xlDialogDeleteName110“删除名称”对话框

xlDialogDemote203“降级”对话框

xlDialogDisplay27“显示”对话框

xlDialogDocumentInspector862“文档检查器”对话框

xlDialogEditboxProperties438“编辑框属性”对话框

xlDialogEditColor223“编辑颜色”对话框

xlDialogEditDelete54“编辑删除”对话框

xlDialogEditionOptions251“编辑选项”对话框

xlDialogEditSeries228“编辑数据系列”对话框

xlDialogErrorbarX463“误差线 X”对话框

xlDialogErrorbarY464“误差线 Y”对话框

xlDialogErrorChecking732“错误检查”对话框

xlDialogEvaluateFormula709“公式求值”对话框

xlDialogExternalDataProperties530“外部数据属性”对话框

xlDialogExtract35“提取”对话框

xlDialogFileDelete6“文件删除”对话框

xlDialogFileSharing481“文件共享”对话框

xlDialogFillGroup200“填充组”对话框

xlDialogFillWorkgroup301“填充工作组”对话框

xlDialogFilter447“对话框筛选”对话框

xlDialogFilterAdvanced370“高级筛选”对话框

xlDialogFindFile475“查找文件”对话框

xlDialogFont26“字体”对话框

xlDialogFontProperties381“字体属性”对话框

xlDialogFormatAuto269“自动套用格式”对话框

xlDialogFormatChart465“设置图表格式”对话框

xlDialogFormatCharttype423“设置图表类型格式”对话框

xlDialogFormatFont150“设置字体格式”对话框

xlDialogFormatLegend88“图例格式”对话框

xlDialogFormatMain225“设置主要格式”对话框

xlDialogFormatMove128“设置移动格式”对话框

xlDialogFormatNumber42“设置数字格式”对话框

xlDialogFormatOverlay226“设置重叠格式”对话框

xlDialogFormatSize129“设置大小”对话框

xlDialogFormatText89“设置文本格式”对话框

xlDialogFormulaFind64“查找公式”对话框

xlDialogFormulaGoto63“转到公式”对话框

xlDialogFormulaReplace130“替换公式”对话框

xlDialogFunctionWizard450“函数向导”对话框

xlDialogGallery3dArea193“三维面积图库”对话框

xlDialogGallery3dBar272“三维条形图库”对话框

xlDialogGallery3dColumn194“三维柱形图库”对话框

xlDialogGallery3dLine195“三维折线图库”对话框

xlDialogGallery3dPie196“三维饼图库”对话框

xlDialogGallery3dSurface273“三维曲面图库”对话框

xlDialogGalleryArea67“面积图库”对话框

xlDialogGalleryBar68“条形图库”对话框

xlDialogGalleryColumn69“柱形图库”对话框

xlDialogGalleryCustom388“自定义库”对话框

xlDialogGalleryDoughnut344“圆环图库”对话框

xlDialogGalleryLine70“折线图库”对话框

xlDialogGalleryPie71“饼图库”对话框

xlDialogGalleryRadar249“雷达图库”对话框

xlDialogGalleryScatter72“散点图库”对话框

xlDialogGoalSeek198“单变量求解”对话框

xlDialogGridlines76“网格线”对话框

xlDialogImportTextFile666“导入文本文件”对话框

xlDialogInsert55“插入”对话框

xlDialogInsertHyperlink596“插入超链接”对话框

xlDialogInsertObject259“插入对象”对话框

xlDialogInsertPicture342“插入图片”对话框

xlDialogInsertTitle380“插入标题”对话框

xlDialogLabelProperties436“标签属性”对话框

xlDialogListboxProperties437“列表框属性”对话框

xlDialogMacroOptions382“宏选项”对话框

xlDialogMailEditMailer470“编辑邮件发件人”对话框

xlDialogMailLogon339“邮件登录”对话框

xlDialogMailNextLetter378“发送下一信函”对话框

xlDialogMainChart85“主要图”对话框

xlDialogMainChartType185“图表类型”对话框

xlDialogMenuEditor322“菜单编辑器”对话框

xlDialogMove262“移动”对话框

xlDialogMyPermission834“我的权限”对话框

xlDialogNameManager977“名称管理器”对话框

xlDialogNew119“新建”对话框

xlDialogNewName978“新建名称”对话框

xlDialogNewWebQuery667“新建 Web 查询”对话框

xlDialogNote154“注意”对话框

xlDialogObjectProperties207“对象属性”对话框

xlDialogObjectProtection214“对象保护”对话框

xlDialogOpen1“打开”对话框

xlDialogOpenLinks2“打开链接”对话框

xlDialogOpenMail188“打开邮件”对话框

xlDialogOpenText441“打开文本”对话框

xlDialogOptionsCalculation318“计算选项”对话框

xlDialogOptionsChart325“图表选项”对话框

xlDialogOptionsEdit319“编辑选项”对话框

xlDialogOptionsGeneral356“常规选项”对话框

xlDialogOptionsListsAdd458“添加列表选项”对话框

xlDialogOptionsME647“ME 选项”对话框

xlDialogOptionsTransition355“转换选项”对话框

xlDialogOptionsView320“视图选项”对话框

xlDialogOutline142“大纲”对话框

xlDialogOverlay86“覆盖图”对话框

xlDialogOverlayChartType186“覆盖图图表类型”对话框

xlDialogPageSetup7“页面设置”对话框

xlDialogParse91“分列”对话框

xlDialogPasteNames58“粘贴名称”对话框

xlDialogPasteSpecial53“选择性粘贴”对话框

xlDialogPatterns84“图案”对话框

xlDialogPermission832“权限”对话框

xlDialogPhonetic656“拼音”对话框

xlDialogPivotCalculatedField570“数据透视表计算字段”对话框

xlDialogPivotCalculatedItem572“数据透视表计算项”对话框

xlDialogPivotClientServerSet689“设置数据透视表客户机服务器”对话框

xlDialogPivotFieldGroup433“组合数据透视表字段”对话框

xlDialogPivotFieldProperties313“数据透视表字段属性”对话框

xlDialogPivotFieldUngroup434“取消组合数据透视表字段”对话框

xlDialogPivotShowPages421“数据透视表显示页”对话框

xlDialogPivotSolveOrder568“数据透视表求解次序”对话框

xlDialogPivotTableOptions567“数据透视表选项”对话框

xlDialogPivotTableWizard312“数据透视表向导”对话框

xlDialogPlacement300“位置”对话框

xlDialogPrint8“打印”对话框

xlDialogPrinterSetup9“打印机设置”对话框

xlDialogPrintPreview222“打印预览”对话框

xlDialogPromote202“升级”对话框

xlDialogProperties474“属性”对话框

xlDialogPropertyFields754“属性字段”对话框

xlDialogProtectDocument28“保护文档”对话框

xlDialogProtectSharing620“保护共享”对话框

xlDialogPublishAsWebPage653“发布为网页”对话框

xlDialogPushbuttonProperties445“按钮属性”对话框

xlDialogReplaceFont134“替换字体”对话框

xlDialogRoutingSlip336“传送名单”对话框

xlDialogRowHeight127“行高”对话框

xlDialogRun17“运行”对话框

xlDialogSaveAs5“另存为”对话框

xlDialogSaveCopyAs456“副本另存为”对话框

xlDialogSaveNewObject208“保存新对象”对话框

xlDialogSaveWorkbook145“保存工作簿”对话框

xlDialogSaveWorkspace285“保存工作区”对话框

xlDialogScale87“缩放”对话框

xlDialogScenarioAdd307“添加方案”对话框

xlDialogScenarioCells305“单元格方案”对话框

xlDialogScenarioEdit308“编辑方案”对话框

xlDialogScenarioMerge473“合并方案”对话框

xlDialogScenarioSummary311“方案摘要”对话框

xlDialogScrollbarProperties420“滚动条属性”对话框

xlDialogSearch731“搜索”对话框

xlDialogSelectSpecial132“特殊选定”对话框

xlDialogSendMail189“发送邮件”对话框

xlDialogSeriesAxes460“系列坐标轴”对话框

xlDialogSeriesOptions557“系列选项”对话框

xlDialogSeriesOrder466“系列次序”对话框

xlDialogSeriesShape504“系列形状”对话框

xlDialogSeriesX461“系列 X”对话框

xlDialogSeriesY462“系列 Y”对话框

xlDialogSetBackgroundPicture509“设置背景图片”对话框

xlDialogSetPrintTitles23“设置打印标题”对话框

xlDialogSetUpdateStatus159“设置更新状态”对话框

xlDialogShowDetail204“显示明细数据”对话框

xlDialogShowToolbar220“显示工具栏”对话框

xlDialogSize261“大小”对话框

xlDialogSort39“排序”对话框

xlDialogSortSpecial192“选择性排序”对话框

xlDialogSplit137“拆分”对话框

xlDialogStandardFont190“标准字体”对话框

xlDialogStandardWidth472“标准宽度”对话框

xlDialogStyle44“样式”对话框

xlDialogSubscribeTo218“订阅”对话框

xlDialogSubtotalCreate398“创建分类汇总”对话框

xlDialogSummaryInfo474“摘要信息”对话框

xlDialogTable41“表”对话框

xlDialogTabOrder394“Tab 键次序”对话框

xlDialogTextToColumns422“分列”对话框

xlDialogUnhide94“取消隐藏”对话框

xlDialogUpdateLink201“更新链接”对话框

xlDialogVbaInsertFile328“VBA 插入文件”对话框

xlDialogVbaMakeAddin478“VBA 创建加载项”对话框

xlDialogVbaProcedureDefinition330“VBA 过程定义”对话框

xlDialogView3d197“三维视图”对话框

xlDialogWebOptionsBrowsers773“Web 浏览器选项”对话框

xlDialogWebOptionsEncoding686“Web 编码选项”对话框

xlDialogWebOptionsFiles684“Web 文件选项”对话框

xlDialogWebOptionsFonts687“Web 字体选项”对话框

xlDialogWebOptionsGeneral683“Web 常规选项”对话框

xlDialogWebOptionsPictures685“Web 图片选项”对话框

xlDialogWindowMove14“窗口移动”对话框

xlDialogWindowSize13“窗口大小”对话框

xlDialogWorkbookAdd281“添加工作簿”对话框

xlDialogWorkbookCopy283“复制工作簿”对话框

xlDialogWorkbookInsert354“插入工作簿”对话框

xlDialogWorkbookMove282“移动工作簿”对话框

xlDialogWorkbookName386“命名工作簿”对话框

xlDialogWorkbookNew302“新建工作簿”对话框

xlDialogWorkbookOptions284“工作簿选项”对话框

xlDialogWorkbookProtect417“保护工作簿”对话框

xlDialogWorkbookTabSplit415“拆分工作簿标签”对话框

xlDialogWorkbookUnhide384“取消隐藏工作簿”对话框

xlDialogWorkgroup199“工作组”对话框

xlDialogWorkspace95“工作区”对话框

xlDialogZoom256“缩放”对话框

UltraEdit-32显示色彩问题

视图-查看方式,看看默认选的什么,里面有没有java项,有的话选上。没有的话,打开高级-配置-编辑器显示-语法高亮-词语列表的完整路径,把它打开。一般默认是WORDFILE.UEW文件,查找一下,看看有没有java的高亮代码,如果没有的话,把下面这段代码复制过去:

----------------------------------------------线下的

/L4"Java" JAVA_LANG Line Comment = // Block Comment On = /* Block Comment Off = */ Escape Char = \ File Extensions = JAV JAVA

/Delimiters = ~!@%^*()-+=|\/{}[]:;"' , .?

/Function String = "%[ ^t]++[ps][a-z]+ [a-z0-9]+ ^(*(*)^)*{$"

/Function String 1 = "%[ ^t]++[ps][a-z]+ [a-z0-9]+ ^(*(*)^)[ ^t]++$"

/Member String = "^([A-Za-z0-9_:.]+^)[ ^t*]+$S[ ^t]++[(=);,]"

/Variable String = "^([A-Za-z0-9_:.]+^)[ ^t*]+$S[ ^t]++[(=);,]"

/Indent Strings = "{"

/Unindent Strings = "}"

/Open Brace Strings = "{" "(" "[" ""

/Close Brace Strings = "}" ")" "]" ""

/Open Fold Strings = "{"

/Close Fold Strings = "}"

/C1"Keywords" STYLE_KEYWORD

abstract

boolean break byte

case catch char class continue

default do double

else extends

false final finally float for

if implements import instanceof int interface

length long

native new null

package private protected public

return

short static super switch synchronized

this threadsafe throw throws transient true try

void

while

/C2"Classes" STYLE_FUNCTION

AWTError AWTEvent AWTEventMulticaster AWTException AbstractMethodError AccessException Acl AclEntry

AclNotFoundException ActionEvent ActionListener Adjustable AdjustmentEvent AdjustmentListener Adler32

AlreadyBoundException Applet AppletContext AppletStub AreaAveragingScaleFilter ArithmeticException Array

ArrayIndexOutOfBoundsException ArrayStoreException AudioClip

BeanDescriptor BeanInfo Beans BigDecimal BigInteger BindException BitSet Boolean BorderLayout

BreakIterator BufferedInputStream BufferedOutputStream BufferedReader BufferedWriter Button ButtonPeer

Byte ByteArrayInputStream ByteArrayOutputStream

CRC32 Calendar CallableStatement Canvas CanvasPeer CardLayout Certificate CharArrayReader CharArrayWriter

CharConversionException Character CharacterIterator Checkbox CheckboxGroup CheckboxMenuItem

CheckboxMenuItemPeer CheckboxPeer CheckedInputStream CheckedOutputStream Checksum Choice ChoiceFormat

ChoicePeer Class ClassCastException ClassCircularityError ClassFormatError ClassLoader

ClassNotFoundException Clipboard ClipboardOwner CloneNotSupportedException Cloneable

CollationElementIterator CollationKey Collator Color ColorModel Compiler Component ComponentAdapter

ComponentEvent ComponentListener ComponentPeer ConnectException ConnectIOException Connection Constructor

Container ContainerAdapter ContainerEvent ContainerListener ContainerPeer ContentHandler

ContentHandlerFactory CropImageFilter Cursor Customizer

DGC DSAKey DSAKeyPairGenerator DSAParams DSAPrivateKey DSAPublicKey DataFlavor DataFormatException

DataInput DataInputStream DataOutput DataOutputStream DataTruncation DatabaseMetaData DatagramPacket

DatagramSocket DatagramSocketImpl Date DateFormat DateFormatSymbols DecimalFormat DecimalFormatSymbols

Deflater DeflaterOutputStream Dialog DialogPeer Dictionary DigestException DigestInputStream

DigestOutputStream Dimension DirectColorModel Double Driver DriverManager DriverPropertyInfo

EOFException EmptyStackException Enumeration Error Event EventListener EventObject EventQueue

EventSetDescriptor Exception ExceptionInInitializerError ExportException

FeatureDescriptor Field FieldPosition File FileDescriptor FileDialog FileDialogPeer FileInputStream

FileNameMap FileNotFoundException FileOutputStream FileReader FileWriter FilenameFilter FilterInputStream

FilterOutputStream FilterReader FilterWriter FilteredImageSource Float FlowLayout FocusAdapter FocusEvent

FocusListener Font FontMetrics FontPeer Format Frame FramePeer

GZIPInputStream GZIPOutputStream Graphics GregorianCalendar GridBagConstraints GridBagLayout GridLayout

Group

Hashtable HttpURLConnection

IOException Identity IdentityScope IllegalAccessError IllegalAccessException IllegalArgumentException

IllegalComponentStateException IllegalMonitorStateException IllegalStateException

IllegalThreadStateException Image ImageConsumer ImageFilter ImageObserver ImageProducer

IncompatibleClassChangeError IndexColorModel IndexOutOfBoundsException IndexedPropertyDescriptor

InetAddress Inflater InflaterInputStream InputEvent InputStream InputStreamReader Insets

InstantiationError InstantiationException Integer InternalError InterruptedException

InterruptedIOException IntrospectionException Introspector InvalidClassException InvalidKeyException

InvalidObjectException InvalidParameterException InvocationTargetException ItemEvent ItemListener

ItemSelectable

Key KeyAdapter KeyEvent KeyException KeyListener KeyManagementException KeyPair KeyPairGenerator

Label LabelPeer LastOwnerException LayoutManager LayoutManager2 Lease LightweightPeer

LineNumberInputStream LineNumberReader LinkageError List ListPeer ListResourceBundle LoaderHandler Locale

LocateRegistry LogStream Long

MalformedURLException MarshalException Math MediaTracker Member MemoryImageSource Menu MenuBar MenuBarPeer

MenuComponent MenuComponentPeer MenuContainer MenuItem MenuItemPeer MenuPeer MenuShortcut MessageDigest

MessageFormat Method MethodDescriptor MissingResourceException Modifier MouseAdapter MouseEvent

MouseListener MouseMotionAdapter MouseMotionListener MulticastSocket

Naming NegativeArraySizeException NoClassDefFoundError NoRouteToHostException NoSuchAlgorithmException

NoSuchElementException NoSuchFieldError NoSuchFieldException NoSuchMethodError NoSuchMethodException

NoSuchObjectException NoSuchProviderException NotActiveException NotBoundException NotOwnerException

NotSerializableException NullPointerException Number NumberFormat NumberFormatException

ObjID Object ObjectInput ObjectInputStream ObjectInputValidation ObjectOutput ObjectOutputStream

ObjectStreamClass ObjectStreamException Observable Observer Operation OptionalDataException

OutOfMemoryError OutputStream OutputStreamWriter Owner

PaintEvent Panel PanelPeer ParameterDescriptor ParseException ParsePosition Permission PipedInputStream

PipedOutputStream PipedReader PipedWriter PixelGrabber Point Polygon PopupMenu PopupMenuPeer

PreparedStatement Principal PrintGraphics PrintJob PrintStream PrintWriter PrivateKey Process Properties

PropertyChangeEvent PropertyChangeListener PropertyChangeSupport PropertyDescriptor PropertyEditor

PropertyEditorManager PropertyEditorSupport PropertyResourceBundle PropertyVetoException ProtocolException

Provider ProviderException PublicKey PushbackInputStream PushbackReader

RGBImageFilter RMIClassLoader RMIFailureHandler RMISecurityException RMISecurityManager RMISocketFactory

Random RandomAccessFile Reader Rectangle Registry RegistryHandler Remote RemoteCall RemoteException

RemoteObject RemoteRef RemoteServer RemoteStub ReplicateScaleFilter ResourceBundle ResultSet

ResultSetMetaData RuleBasedCollator Runnable Runtime RuntimeException

SQLException SQLWarning ScrollPane ScrollPanePeer Scrollbar ScrollbarPeer SecureRandom Security

SecurityException SecurityManager SequenceInputStream Serializable ServerCloneException ServerError

ServerException ServerNotActiveException ServerRef ServerRuntimeException ServerSocket Shape Short

Signature SignatureException Signer SimpleBeanInfo SimpleDateFormat SimpleTimeZone Skeleton

SkeletonMismatchException SkeletonNotFoundException Socket SocketException SocketImpl SocketImplFactory

SocketSecurityException Stack StackOverflowError Statement StreamCorruptedException StreamTokenizer String

StringBuffer StringBufferInputStream StringCharacterIterator StringIndexOutOfBoundsException StringReader

StringSelection StringTokenizer StringWriter StubNotFoundException SyncFailedException System SystemColor

TextArea TextAreaPeer TextComponent TextComponentPeer TextEvent TextField TextFieldPeer TextListener

Thread ThreadDeath ThreadGroup Throwable Time TimeZone Timestamp TooManyListenersException Toolkit

Transferable Types

UID URL URLConnection URLEncoder URLStreamHandler URLStreamHandlerFactory UTFDataFormatException

UnexpectedException UnicastRemoteObject UnknownError UnknownHostException UnknownServiceException

UnmarshalException Unreferenced UnsatisfiedLinkError UnsupportedEncodingException

UnsupportedFlavorException

VMID Vector VerifyError VetoableChangeListener VetoableChangeSupport VirtualMachineError Visibility Void

Window WindowAdapter WindowEvent WindowListener WindowPeer WriteAbortedException Writer

ZipEntry ZipException ZipFile ZipInputStream ZipOutputStream

/C3"Operators" STYLE_OPERATOR

!

%

*

+

-

// /

=

^

|

~

------------------------------------------------到线上结束

其中第一行L4是行号,不要与文件中的重复就可以了。

datalit前台绑定数据后的分行问题.

好了不说多话了,我们这一节要来看看如何使用asp+中的控件吧。

ASP+中的控件分为两种,一种是HTML控件(HtmlControls),一种是Web控件(WebControls),我们这一节先来讲讲比较简单的HTML控件。另一种控件留到下一节再去讲:)

HTML控件,如果只是看外观,发现和普通的HTML标签没有什么两样,不过就是

selecta

这些东东,唯一的区别就是在标签的后面多了个RunAt="server",其实我们对这个RunAt="Server"我们也不陌生,呵呵,在asp的global.asa文件我们经常看到。但是如果在asp+中多了这个,那么程序代码的性质也就变了。如:

selectid="aspcn"

optionASP/option

optionJSP/option

optionPHP/option

/select

上面的select不过是一个普通的HTML标签而已,但是如果在select后加上RunAt="server",那么一切都变了。

selectid="aspcn"RunAt="Server"

optionASP/option

optionJSP/option

optionPHP/option

/select

那么这个就是一个asp+程序,我们就可以写ASPX程序了。如:

%@importNameSpace="System.Data"%

ScriptLanguage="c#"RunAt="Server"

voidaspcn_onclick(Objectsrc,EventArgse)

{

stringselectValue;

if(Page.IsPostBack)

{

selectValue=aspcn.SelectedItem.Value;

SelectItem.Text=selectValue;

}

}

/script

html

headtitleSelect演示程序/title/head

body

请选择:

formrunat="server"

selectid="aspcn"RunAt="Server"

optionASP/option

optionJSP/option

optionPHP/option

optionASP+/option

optionCOM/option

/select

asp:Bottuntext="提交"OnClick="aspcn_onclick"

br

您的选取的Select列表是:fontcolor=redasp:Labelid="SelectItem"Text="暂无"/font

/form

上面是一个很简单的aspx例子,主要目的是演示selectHTML控件的用法.上面的例子中,首先显示如下:

请选择:ASPJSPPHPASP+COM

您的选取的Select列表是:暂无

当你点击"提交"键后,你就会后到:(假设我们选取的是PHP)

请选择:ASPJSPPHPASP+COM

您的选取的Select列表是:PHP

从上面的例子中我们可以看到,我们主要操作的是aspcn_onclick子程序,而这个程序是由名为sub的控件激发的。(这里的Button和Label均属于WEB控件,我们下一节再讲),我们在aspcn_onclick中对于名为aspcn的select控件的操作,我们也很熟悉,呵呵,是不是很像客户端的JavaScript?!相信用过javascript的兄弟,一定能看懂程序,呵呵,我们写服务器程序是不是像是在写客户端的程序,M$推出.Net也就是为了达到这个效果,不过这个对初学者来说是个不太好的事情,因为初学者本来就搞不清什么是客户端什么是服务器,现在又把他们写在一起,相信很多人要搞糊啦,所以我一开始就建议初学者还是先看看一些基础的东东为好。

我们使用aspcn.SelectedItem.Value来获取aspcn列表的值,然后通过SelectItem.Text=selectValue再把这个值传给名为selectItem的控件。就成为了我们看到的情形。程序是很简单的,我们在这里只是让大家有一个初步的了解。

几乎每一种HTML标签加上个RunAt="server"就可以成为HTML控件了。具体的有:

HtmlAnchorHtmlButtonHtmlFormHtmlGenericControl

HtmlImageHtmlInputButton(Button)HtmlInputButton(Reset)HtmlInputButton(Submit)

HtmlInputCheckBoxHtmlInputFileHtmlInputHiddenHtmlInputImage

HtmlInputRadioButtonHtmlInputText(Password)HtmlInputText(Text)HtmlSelect

HtmlTableHtmlTableCellHtmlTableRowHtmlTextArea

我一时也无法把他们的用法一个个的说明,请大家到我上面说的那个站点自已去看,我们以后写程序就要熟练使用HTML控件和Web控件了。只要E文好,相信没有什么问题,呵呵,不要指望飞刀我翻译啊,我头都大了,大家饶我一命。

另外我们要提醒大家的就是,因为我们写ASP+一般都用c#,所以在命名控件时注意大小写,不然编译时会出错的。再有就是如果程序编译时请仔细看好出错信息,不要一出错就马上想到去问,自已动脑筋去想想,收获会更大。呵呵,这一章就到这里了,下一节就要讲WEB控件。

(先说一下我的安排了咯,呵呵,讲完WEB控件后,再讲Bind,然后就是数据库,接着就是Application和Session,再后来的以后再安排)

88,祝大家过个好春节:)

整天的泡在考研的资料里面,闲暇时就和朋友们大谈特谈NGWS,一天终于被lazy兄一棍子打醒,"都什么年代了,还在谈NGWS",慌忙中赶快重新下载我心目中的"NGWS",装上后,发现今非昔比,这个NGWS已经改名叫Micosoft.net,ASP+也堂而皇之的改名为ASP.NET.而且现在不仅window2000能够安装调试asp.net了,而且连最烂的"瘟酒吧"也可以了,于是发现自已离时代越来越远了.....(台下人:发表什么感叹,还不快入正题)(同时,一不明飞行物突然向飞刀砸来,飞刀立刻倒在血泊中.....)

Web控件

按照计划我们这一节要谈Web控件,我想了半天也不知道如何定义这个web控件,它比html控件难于理解,毕竟HTML太像原来我们熟悉的东东了。而web控件确与我们平常见到的有很大的出入,不知道大家还记不记得我说过的一句话,那就是ASP.net的程序就像是写VBVC中的窗口,先再这些窗口中加入我们的需要的控件,然后再对这些控件进行操作。如果你学过一点点VBVC的编程,那么理解这个就不难了,ASP.net中的web控件就像是VBVC中的控件一样。我们先在页面中摆好这些控件,然后再通过Page_Load以及其它一些自定义事件来对他们进行控制。我们还是通过看一个实例来了解一下吧。我们先举简单的Label控件吧.

源代码如下:

测试Label控件:

这是红色粗体的文字

这段程序执行后的结果是

测试Label控件:

这是红色粗体的文字

这是蓝色斜体的文字

这是黑体字,并且带下划线

看看源代码,再看看程序执行的结果是不是发现Label控件和VB中的Label控件很相近:)

(注:你在你的机器上看到的中文可能是乱码,那么请您打开x:\winnt\microsoft\framework\v1.0.224目录,找到其中的config.web文件,打开它,找到下面的文字:

requestencoding="iso-8859-1"

responseencoding="iso-8859-1"

/

把其中的iso-8859-1改为gb2312,OK,再执行一下程序,中文是不是出来了:)

这里我们用了三种方法来操作Label控件,第一种是类似HTML的闭合标签,将要写的字写在之间;第二种是用到了Label控件Text属性;第三种,是通过执行Page_Load事件而把文字写进Label控件的。这三种方法都很有用,看你自已的喜欢了,第三种是最常用的啦,以后我们会经常用到.Label控件不光有Text属性来控制它的文字,而且还有font-size等属性来控制字体大小,颜色等属性,这里的例子我都用到了,大家好好看看,相信没有什么问题

我们见过了Label控件的操作,那么我们对web控件有了一个感性的认识,在ASP.net中,一共有28个WEB控件,它们是:

AdRotatorButtonCalendarCheckBox

CheckBoxListCompareValidatorCustomValidatorDataGrid

DataListDropDownListHyperLinkImage

ImageButtonLabelLinkButtonListBox

PanelRadioButtonRadioButtonListRangeValidator

RegularExpressionValidatorRepeaterRequiredFieldValidatorTable

TableCellTableRowTextBoxValidationSummary

大家可以到我上一节讲的那个站点去具体看一下他们各自的用法,这里我本来想主要讲一下DataGrid,DataLit,ListBox但是他们其中都需要用到Binding知识(这个我们在下一节讲),所以我们主要来看看DropDownList的用法(因为我们上一节是用的select来讲解HTML控件的)

先看一个例子:

请选择ASPCN.Com工作室程员:

飞刀

大风

Zsir

布丁

亚豪

它执行显示为:

请选择ASPCN.Com工作室程员:

飞刀大风Zsir布丁亚豪

如果我选中了其中的飞刀,然后再按下"提交"键,那么显示就是:

请选择ASPCN.Com工作室程员:

飞刀大风Zsir布丁亚豪

您选择的是本工作室的飞刀成员

DropDownList控件,其实和select差不多,功能也就多那么一点点,但是这个多一点点的功能就是很有用的,这就是我们下一节要学习的Bind,呵呵,是不是想学了:)不急,我们先分析一下这里的程序。

我们用DropDownList控件建立起一个List列表,然后我们选择其中的一个选项,最后按提交键提交。这里我们可以看到处理程序的是sub_click这个事件,这里由名为sub的button控件激发,所用的事件是Onclick,这里和HTML控件所使用的OnServerClick事件是不同的,大家要分清楚。其它的好像没有什么可以说了。呵呵

android开发程序中implements searchview 以后无法跳转页面(这以前可以跳转)

类型转换错误啊,你自己看下Log里面的错误信息。

你的是android.widget.SearchView,不是android.support.v7.widget.SearchView。看下你Hello2里面的import是不是import 的android.support.v7.widget.SearchView。如果是,就删掉重新导入android.widget.SearchView

(责任编辑:IT教学网)

更多

推荐广告特效文章