欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    计算机外文文献+翻译(.net).docx

    • 资源ID:93879089       资源大小:37.31KB        全文页数:26页
    • 资源格式: DOCX        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    计算机外文文献+翻译(.net).docx

    东北石油大学本科毕业设计英文文献及翻译学院计算机与信息技术学院班级 计科07-1班学号姓名指导教师职称副教授键入文字1对控件应用格式在下列的部分中,你学会该如何创建更有吸引力的Web窗体。首先, 你浏览一下针对所有Web控件格式属性他们是基本控件类的格式属性。 然后,你学会在Web控件上应用样式表风格。3用验证控件做页面验证使用客户端验证传统地,当增加验证到他们的页面中时,他们会面临一个严峻的选 择。你可以添加窗体页面验证规则到你的服务器端代码,或者是添加验 证规则到你的客户端代码。写验证代码到客户端代码中的优势能够及时反馈到你的用户。举例 来说,一个使用者忽略在一个要求检验的字段中输入一个值,你能够及 时的显示一个错误信息而不需要返回到服务器端解决。人们喜欢客户端的验证。它看起来很棒而且产生一种比较好的效 果。然而,问题是它不与所有的浏览器兼容。不是所有的浏览器支持 JavaScript不同版本的浏览器的不同版本支持JavaScript所以客户端验证没 有保障。由于这个原因,许多开发者在过去决定添加自定义验证到服务器端。 因为服务器端代码能够和任何浏览器协同工作。就这样的做法更有安全 的保障。键入文字1幸运地,正如在章节讨论的这些验证控件不会强迫你做困难的选择。 这些验证控件会自动地产生客户端代码和服务器端代码。如果一个浏览 器有能力支持JavaScript,客户端的验证脚本将会自动返回到浏览器。如果 一个浏览器不支持JavaScrip邨个验证规则会自动在服务器端代码中执行。然而你需要注意的是,客户端的驹证仅仅能够工作在正4。或更高的 版本。尤其,正如这一章讨论的客户端脚本不可能在任意本本的浏览器 中运行。控制字段:RequiredFieldValidato盥牛你用这个控件来检查在一个Web窗体中是否为空,典型地,你和 TextBox控件一起使用这个控件。然而,这个控件也可以用在其他的输 入型控件,例如:RadioButtonLisffio验证表达式:RegularExpressionValidato蟀件你能使用RegularExpressionValidat控件来验证输入的值是否和定义 的正则表达式相匹配。例如:你能使用这控件来检查一个用户是否输入 一个合法的电子邮件地址,电话号码,用户名或密码。怎样用一个正则 表达式来完成这些验证任务将会在下面的例子中一一列出。10键入文字1比较值:CompareValidator 控件这个CompareValidator控件用于比较一个输入的数据和另外一个值 是否相同。另外一个值可能是固定值,例如:一个特定的数字或者是输 入到另一个控件中的一个值。总结错误:ValidationSummary控件假想一个页面有50个字段假如你仅仅用上部分讨论的那些验证控件 来显示错误看见一个错误在页面中将是很难的。例如:你可能需要滚动 到第48个页面字段来找到这个错误信息。幸好,微软除了包含上面提到的控件还包括Validationsummary控 件。你能用这控件综合所有的错误信息在一个页面的上端或者你想要的 任何一个地方。4先进的控件编程保存浏览状态默认地,几乎所有的ASP.NET控件都会在先前的窗体中保留他们 的属性值。举例来说,如果你输入文本到一个Lebel标签上然后提交那个 页面,当那个页面再次被访问那个Lebel标签的内容将会被保存下来。浏览状态的妙处是它不依赖任何的特定服务器或浏览器的属性。尤 其,它不依赖cookies,sessio变量、或应用程序变量。浏览状态在一个 名叫做VIEWSTATE 的隐藏页面中执行,这个隐藏页面自动创建每个Web11键入文字1窗体。当灵活的应用时,浏览状态能够在你的网站中产生艺术性的和积极的 效果,例如:如果你在一个支持浏览状态的控件中显示数据库数据,你 不需要每次都返回到需要反馈到服务器的数据库页面。你能够自动地保 存页面里的数据状态。显示和隐藏内容假想你正在用一个可选择的部分创造页面。举例来说,假想你正在 创造一种在线纳税系统,而且你想要显示或者隐藏一个包含适用于已婚 的税文件编档员的问题的部分。或者,假想你想要添加一个帮助按钮到网站上去。你可能想要隐藏 或者显示完成依靠用户参考的问题的详细说明。最后,假想你想要把一个tax form变成很多页面,以便一个人每次 只看那个tax for® 一部分。在下列的部分中,你学会用属性设置在一个窗体中来隐藏或显示控 件。你学会用单个控件和一组控件设置Visible and Enab属性来隐藏和显 示页面内容。使用 Visible andEnabled属性每个控件包括HTML和Web控件有一个Visible属性来决定那个 控件是否可见。当一个控件的Visibl是fals值,那个控件就不会在页面 上显示;那个控件也不会进一步运行。Web控件(不是每个HTML控件)还有一个叫Enabled的属性。当12【键入文字1Enabled的属性是false值,你用的浏览器是IE4.0或更高的版本那个控件被 封住了,也不起作用了,当用其他的浏览器的时候,如:网景浏览器那 个控件不会被封,但它也是不起作用的。使浏览状态失效在特定的环境中,你可能想要对一个单独的控件或ASP.NET页面作 为一个整体的浏览状态失效。举例来说,你可能使用一个有包含许多数据 的控件(假想一个RadioButtonLis控件控制1,000个选项)假如你担心页面数 据会大大的降低页面的显示速度,你可能不想要加载数据到隐藏的 VIEWSTATE页面字段。使用丰富页面的控件在下列的部分中,你学会在ASP.NET Framework怎样使用三种特征 控件。学会该如何使用日历控件显示交互式日历,AdRotator控件显示滚 动的广告,HTMLInputFile控件来接受文件的上传。13键入文字1ASP.NET TechniqueBuilding ASP.NET PagesASP.NET and the .NET FrameworkASP.NET is part of Microsofts overall .NET framework, which containsa vast set of programming classesdesigned to satisfyany conceivable programming need.In the following two sections, you learn how ASP.NETfits within the .NET framework, and you learn about the languages you canuse in your ASP.NET pages.The .NET Framework Class LibraryImagine thatyou are Microsoft.Imagine thatyou have to support multipleprogramming languagesuch as Visual Basic, JScript, and C+. A great deal of the functionality of these programming languages overlaps.example, for each language, you would have to include methods for accessi the file system, working with databases, and manipulating strings.Furthermore,theselanguagescontainsimilarprogramming constructs.Every language,forexample,can representloopsand conditionalsE.ven though the sy ntaxofa conditionaitterin VisualB asic differfromthe syntax of a conditional written in C+, the programming function is theFinallynostprogramminglanguages have similar varriitetypes.In most languages, you have some means of representing strings and intege14键入文字1for example. The maximum and minimum size of an integer might depend on the language but the basic data type is the same.Maintaining all this functionality for multiple languages requires a work. Why keep reinventing the wheel? Wouldn't it be easier to create all functionality once and use it for every language?The .NET Framework ClassLibrarydoesexactl)thatItconsist©fa vast set of classes designed to satisfy any conceivable programming need, example, the .NET framework contains classes for handling database access working with the file system, manipulating text, and generating graphics, additionjtcontainsnore specializedasseforperformingtaskssuchas working with regular expressions and handling network protocols.The .NET framework, furthermore, contains classes that represent all basic variabldatatypessuch as stringsjntegersfytescharactersgidarrays.Most importantly, for purposes of this book, the .NET Framework ClassLibrarycontainsclassesfor buildingASP.NETpages.You need tounderstand, however, that you can access any of the .NET framework classe when you are building your ASP.NET pages.Understanding NamespacesAs you might guess, the .NET framework is huge. It contains thousandsof classes(over3,400).Fortunatelyt,heclassesarenotsimplyjumbled15键入文字1together. The classes of the .NET framework are organized into a hierarch namespaces.ASP Classic NoteIn previous versions of Active Server Pages, you had access to only standarcfclassetheResponse,Request,SessionApplication9id Server objects)ASP.NET,in contrastgovidesyou with access to over3,400 classes!A namespace isa logicaroupingofclassesFor example,allthe classes that relate to working with the file system are gathered together the System.IO namespace.The namespacesareorganizedntoahierarchalogicatree)A the rootofthe treeistheSystemnamespace.Thisnamespacecontainsallthe classeforthebase datatypes3uchasstringandarraysltalsocontains classes for working with random numbers and dates and times.You can uniquely identify any class in the .NET framework by using th full namespace of the class. For exfiropliajquely refer to the class that represents a file system file (the File class), you would use the followiSystemJO.FileSystem.IO refers to the namespace, and File refers to the particular NOTE16键入文字1You can view allthenamespacesof the standar±lassesnthe .NET Framework ClassLibraryby viewing the ReferenceDocumentationfor the .NET Framework.Standard ASP.NET NamespacesThe classes contained in a select number of namespaces are available yourASP.NET pages by default(You must explicitljmport other namespaces.)Thesedefaultnamespacescontainclassesthatyou usemost often in your ASP.NET applications:System- Contains all the base data types and other useful classes su asthoserelateibgeneratingandom numbers and working withdatesand times.System.Collections Contains classesfor working with standard collection types such as hash tables, and array lists.(Contains classes that represent specialized collections such as linked lists and string collections.System.ConfiguratienContains classes for working with configurationfiles (Web.config files).System. Tex JContains classes for encoding, decoding, andmanipulating the contents of strings.17键入文字1System.Text.RegularExpressiensContainsclassesfor performing regular expression match and replace operations.System.Web一 ContainsthebasicclasseforworkingwiththeWorld Wide Web, includingclassesforrepresentinbgrowserrequestsand server responses.- Contains classes used for caching the content of pages and classes for performing custom caching operations.Contains classes for implementingauthentication and authorization such as Forms and Passport authenticatioSystem.Web.SessionStateContainsclasseforimplementingsession state.一 Containsthebasicclassesusedinbuildingtheuser interface of ASP.NET pages.一 ContainstheclassesfortheHTML controls.System.Web.ULWebControls Containsthe classesfor the Web controls.NET Framework-Compatible LanguagesFor purposes of this book, you will write the application logic for ASP.NET pages using Visual Basic as your programming language. It is thedefault language for ASP.NET pages. Although you stick to Visual Basic in18键入文字1ASP.NET技术1构建ASP.NET页面ASP.NET和ASP.NET结构ASP.NET是微软.NET framework整体的一部分,它包含一组大量的编 程用的类,满足各种编程需要。在下列的二个部分中,你如何学会 ASP.NET很适合的放在.NET framework,和学会能在你的ASP.NET页面 中使用语言。NET类库假想你是微软。假想你必须支持大量的编程语言-比如Visual Basic、C#和C+.这些编程语言的很多功能具有重叠性。举例来说,对 于每一种语言,你必须包括存取文件系统、与数据库协同工作和操作字 符串的方法。此外,这些语言包含相似的编程构造。每种语言,举例来说,都能够使 用循环语句和条件语句。即使用Visual Basi写的条件语句的语法不与用 C+写的不一样,程序的功能也是相同的。最后,大多数的编程语言有相似的数据变量类型。以大多数的语言, 你有设定字符串类型和整型数据类型的方法。举例来说,整型数据最大 值和最小值可能依赖语言的种类,但是基本的数据类型是相同的。键入文字1this book, you also need to understand that you can create ASP.NET pages using any language that supports the .NET Common Language Runtime. Out ofthebox, thisincludesC#,JScript.NET,and theManaged ExtensionstoC+.NOTEThe CD includedwiththisbook containsC# versionsofallthecode samples.Dozens ofotherlanguagescreatedby companiesotherthanMicrosofthave been developed to work with the .NET framework. Some examples of theseotherlanguagesincludd)ython,SmallTalkJEiffeldCOBOL.This means thatyoucould,ifyoureallywantedto,writeASP.NETpages usingCOBOL.Regardless of the language that you use to develop your ASP.NET pagesyou needtounderstandthatASP.NET pages are compiledbeforetheyare executed. This means that ASP.NET pages can execute very quickly.The first time you request an ASP.NET page, the page is compiled intoa .NET class, and the resulting class file is saved beneath a special diron your servernamed Temporary ASP.NET Files.For each and every ASP.NET page, a correspondingclass fileappears in the Temporary ASP.NET Filesdirectory. Whenever you request the same ASP.NET page in the future, the corresponding class file is executed.19键入文字1When an ASP.NET page is compiled jtis not compiled directlynto machine code. Insteadjtis compiled into an intermediate-lextdiguage called Microsoft IntermediateLanguage (MSIL). All .NET-compatible languages are compiled into this intermediate language.An ASP.NET page isntompiledintonativemachine code untiltis actually requested by a browser. At that point, the class file containedTemporary ASP.NET Files directoirsycompiledwiththe .NETframeworkJust in Time (JIT) compiler and executed.The magical aspect of this whole process is that it happens automatic in the background. All you have to do is create a text file with the sour for your ASP.NET page, and the .NET framework handles all the hard work of converting it into compiled code for you.ASP CLASSIC NOTEWhat about VBScript?Before ASP.NET,VBScript was the mostpopular language for developing Active Server Pages.ASP.NET doesnotsupportVBScript,and thisisgood news.Visual Basicisa supersetofVB Script, which means thatVisualB asichasallthe functionality of VBScript and more. So, you have a richer set of function statements with Visual Basic.20键入文字1Furthermore, unlike VBScript, Visual Basic is a compiled language. Th means that if you use Visual Basic to rewrite the same code that you wrot with VBScript, you can get better performance.If you have worked only with VBScript and not Visual Basic in the pas don't worry. Since VBScript is so closely related to Visual Basic, you'H easy to make the transition between the two languages.NOTEMicrosoftincludesan interestintgoolnamedthe IL Disassembler(ILDASM) with the .NET framework. You can usethistooltoview the disassembledcode for any oftheASP.NETclassesin theTemporaryASP.NET Files directory. It lists all the methods and properties of the and enables you to view the intermediate-level code.ThistoolalsoworkswithalltheASP.NET controlsdiscussedinthis chapter.For example, you can use the IL Disassemblerto view the intermediate- levceoldefortheTextBox control(locatedina filenamed System.Web.dll).Introducing ASP.NET ControlsASP.NET controlprovidethedynamicandinteractipertion©f the user interface for your Web application. The controls render the content the users of your Web site actually see and interact with. For example, y21键入文字1canusecontroltocreatdHTML formelementsjnteractivalendars9id rotating banner advertisements.ASP.NET controlscoexistpeacefullywithHTML content.Typically, you create the static areas of your Web pages with normal HTML content an create the dynamic or interactive portions with ASP.NET controls.The best way to understand how ASP.NET controls work in an HTML page is to look at a simple Web Forms Page.Adding Application Logic to an ASP.NET PageThe second building block of an ASP.NET page is the application logic which is the actual programming code in the page. You add application log to a page to handle both control and page events.If a user clicks a Button control within an HTML form, for example, t Button control raises an event (the Click event). Typically, you want to code to the page that does something in response to this event. For examp when someone clicklheButton controljou mightwant tosavethe form data to a file or database.Controls are not the only things that can raise events. An ASP.NET pa itself raises several events every time it is requested. For example, whe you requesta page,the page's Load eventistriggered¥)ucan addapplication logic to the page that executes whenever the Load event occur22Building Forms with Web Server ControlsBuilding Smart FormsYou use several of the basic Web controls to represent standard HTML form elements such as radio buttons, text boxes, and list boxes. You can thesecontrolm your ASP.NET pagestocreatdheuserinterfacforyourW ebapplicationT.he followingsectionsprovidedetailedoverviews andprogramming samples for each of these Web controls.Controlling Page NavigationInthe followinectionjy)u learnhow tocontrohow ausermovesfrom one ASP.NET page to another. First, you learn how to submit an HTML form to another page and retrieve form information. Next, you learn how t usetheRedirect(iethod toautomaticallransfea usertoa new page.Finally, you learn how to link pages together with the HyperLink control.Applying Formatting to ControlsInthe followingpctionpu learn how tanake more attractiWebforms. First, you look at an overview of the formatting properties commonall Web controls; they are the formatting properties of the base control Next, you learn how to apply Cascading Style Sheet styles and classes to controls.23键入文字11. Performing Form Validation with Validation ControlsUsing Client-side ValidationTraditionallWye,b developershavefacedatoughchoicewhen adding form validation logic to their pages. You can add form validation routine your server-sideode,or you can add the validationoutinesto your client-side code.The advantage of writing validation logic in client-side code is that can provide instant feedback to your users. For example, if a user neglec entera valueina requiredorm fieldyou can instantlisplajan error message without requiring a roundtrip back to the server.People really like client-side validation. It looks great and createsoverall user experience. The problem, however, is that it does not work allbrowsers.Not allbrowserssupportJavaScripta,nddiflferenvtersionsofbrowsers support differen

    注意事项

    本文(计算机外文文献+翻译(.net).docx)为本站会员(太**)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开