ASP的用户.. NET页在字段中输入值, 下一个字段的选项卡, and notices the screen refreshes at that time—the loading icon briefly shows in the browser tab. What is happening in this scenario behind the scenes in the browser and/or the server?
View answer
程序员附加了回发事件处理程序,例如,使用 AutoPostBack 控件的属性. A small bit of JavaScript in the page causes it to submit the form when the control loses focus (or when the value changes, 比如用下拉控件). The server then invokes the event handler, which re-renders the page back to the browser.
第二种技术是绕过原生ASP.NET and write your own JavaScript code using jQuery or another way of supporting AJAX.
3.
Does ASP.NET allow and/or require programmers to keep HTML, JavaScript, and C# in separate files? 如果是这样,他们为什么要分开呢?
View answer
ASP.. NET使用一个称为 code behind 允许所有HTML标记在视图文件中(使用 .aspx 扩展),而行为是在单独的c#类(类)中定义的 后台代码的类, with the .aspx.cs extension). JavaScript通常也作为单独的文件提供.
Keeping things separate allows the person responsible for visual layout to only touch that file, 而另一个人可能负责c#中的编码行为. 布局和行为可以独立改变而不会相互影响. ASP.NET鼓励(但不强制)以这种方式进行分离.
一种技术被称为 view state. 当你使用viewstate, the collection of server-side state variables gets serialized and sent to a hidden client-side form field. 当表单提交回服务器时, the serialized string is re-inflated to form the collection of server-side state variables.
另一个技巧是 会话状态. The collection of objects associated with a user session is persisted in server memory or a database, 客户端cookie用于将每个用户会话映射到集合.
5.
Does ASP.NET allow and/or require programmers to combine HTML, JavaScript, and/or C# in the same file? 如果是这样,为什么它们要合并呢?
View answer
It is possible to interleave all three kinds of code in one file, even in the same line of code. Notwithstanding the reasons to keep them separate, there are also some reasons to combine them.
例如,假设您的HTML包含一个控件 , but no label3 control. 你可以参考 label2.Text 在c#代码中没有编译错误,但如果你试图引用 label3.Text,则会导致编译错误.
编译器是如何完成的呢?
View answer
Visual Studio分析 .aspx page and auto-generates the declarations into another file—one which is rarely inspected by developers. The declarations are part of the same class using the mechanism of partial classes.
7.
给出以下工具列表, languages, 以及可能用于web应用程序的技术:
确定哪些是类别
把剩下的放到你确定的类别中
非常简单地解释每个类别内的关系
以下是按字母顺序排列的列表,供您分类:
AJAX
应用程序服务器
ASP.NET
Base64
Binary
Bootstrap
Browser
C#
Client
客户端框架
通信协议
数据库服务器
HTTP
JavaScript
jQuery
JSON
.NET
Postback
编程语言
序列化格式
服务器端框架
SQL
Technique
Tier
Validation
Visual Basic
Web Forms
XML
View answer
服务器端框架: .NET是微软一系列框架的名字. ASP.. NET是web相关技术的集合 .NET. Web Forms is a subset of that collection, encapsulating a particular programming model.
客户端框架: The browser tier may use code libraries or frameworks, which usually consist of JavaScript and CSS. 列出的客户端框架是jQuery和Bootstrap.
Techniques: These items each involve different combinations of concepts mentioned above: AJAX, postback, 和验证.
Note申请人不需要得出与这个列表完全相同的结论, 因为在术语上有一些歧义. However a discussion of these points can yield insight into the applicant’s thought process.
8.
你的网站需要一些重复. 特别是:
相同的页眉和页脚将出现在大多数页面上
有些页面需要标题的精简版本
“立即捐赠”按钮和图片将只在其中四个页面上重复使用
您不希望重复代码, 对于每一个元素, 如何一次写完,然后在很多页上出现?
View answer
对于页眉和页脚,您可以使用母版页来定义模板. Then each content page can refer to the master page instead of repeating the header and footer.
For the few pages that need a condensed header, you can use a separate master page.
对于捐赠按钮,您将使用用户控件.
9.
应用程序中的页面显示客户端列表, 每个都呈现为指向客户端详细信息页面的链接. 虽然大多数链接都有效, a bug has been reported that only affects client names containing the ampersand character, 比如“威利” & Sons”. 对于这些客户, 当你点击链接的时候, the client detail page only shows “Wiley” and cuts off the rest of the client name.
为什么会发生这种情况?? 给出有关从列表页到详细页面的链接的技术细节.
View answer
A careless programmer forgot to URL-encode the URL in the “href” property of the link. 例如,链接可能在最终的HTML中被错误地呈现为:
What is wrong or suspicious about this analysis of a bug that you received from a tester? 你觉得问题出在哪里?
数据库有问题. 我们可以在纸上重现这个问题 CustomerEdit.aspx. 每当用户编辑客户记录并错误格式化电话号码时, 并单击Save, 它显示了一个错误页面. 发生错误是因为浏览器向数据库发送了一个PUT请求, 但是客户表需要一个格式正确的电话号码. 如果格式错误,有时会出现SQL错误. 页面显示“无效索引:-1”. Also if I query the customer table, some of the phone numbers are not formatted right.
View answer
There are several statements that show the tester is not understanding the situation very well:
浏览器几乎不会直接与数据库通信.
The HTTP PUT 动词不太可能与ASP一起使用.NET网页表格.
这不太可能是数据库错误,因为:
It is possible, but unusual, to implement phone number formatting at the database level
如果它是在那个层次上实施的, it would be unlikely to break in a manner that would allow some misformatted values into the database
When you implement some server-side behavior in response to selecting an item in the client dropdown, 一个新的bug突然出现了. The bug can be replicated by checking some of the boxes and then selecting a different client. 然后,之前选中的复选框将被清除. 为什么会发生这种情况??
View answer
The reason is most likely that a postback event was added to the client dropdown, 导致页面刷新, 但是复选框的视图状态没有正确地进行往返. 也就是说, 这些值没有包含在提交给服务器回发的表单中, 和/或在页面刷新期间不重新渲染.
There are a couple complications with the page’s requirements that make this scenario likely:
Checkboxes only send values to the server when checked and are simply omitted when cleared. 所有其他输入类型总是发送值.
When a page requires a variable-length list of controls, it becomes harder to stay within the ASP.. NET编程模型, so programmers might resort to emitting the controls by code in a manner that does not participate in the round-tripping of values.
Dmitry是一位拥有20多年创作经验的顶尖开发者 .. NET web应用程序. 他主要和ASP打交道.. NET Core和Blazor (c#, .. NET Core)软件开发和体系结构设计. Dmitry has received the Microsoft MVP (Developer Technologies) Award nine times and is a capable community leader. He has also received a Master of Science degree in computer science and structural geology and modeling. 客户称他为“编码机器”."
Cheryl is a developer with strong communication skills who seeks to provide software solutions that delight her clients. 她喜欢使用React、Node.js, REST APIs, GraphQL, SQL, MongoDB, and JavaScript recently and is ready to start putting her skills to work for you. 除了她的技术背景, Cheryl has an MBA and can translate your business requirements into quality software solutions.
Mihael has been a developer for 10+ years—with 7+ years of experience working with the .NET framework, large system integrations, and enterprise solutions for various industries. 他还拥有信息系统硕士学位. 他专门从事企业级应用程序开发 .网络平台. Mihael has worked on numerous successfully delivered projects—working on the front-end and back-end.
例如,假设您的HTML包含一个控件 , but no label3 control. 你可以参考 label2.Text 在c#代码中没有编译错误,但如果你试图引用 label3.Text,则会导致编译错误.
\n\n
编译器是如何完成的呢?
\n","answerBody":"
Visual Studio分析 .aspx page and auto-generates the declarations into another file—one which is rarely inspected by developers. The declarations are part of the same class using the mechanism of partial classes.
\n","identifier":3278936},{"questionBody":"
给出以下工具列表, languages, 以及可能用于web应用程序的技术:
\n\n\n
确定哪些是类别
\n
把剩下的放到你确定的类别中
\n
非常简单地解释每个类别内的关系
\n\n\n\n\n
以下是按字母顺序排列的列表,供您分类:
\n\n
\n
AJAX
\n
应用程序服务器
\n
ASP.NET
\n
Base64
\n
Binary
\n
Bootstrap
\n
Browser
\n
C#
\n
Client
\n
客户端框架
\n
通信协议
\n
数据库服务器
\n
HTTP
\n
JavaScript
\n
jQuery
\n
JSON
\n
.NET
\n
Postback
\n
编程语言
\n
序列化格式
\n
服务器端框架
\n
SQL
\n
Technique
\n
Tier
\n
Validation
\n
Visual Basic
\n
Web Forms
\n
XML
\n
\n","answerBody":"
服务器端框架: .NET是微软一系列框架的名字. ASP.. NET是web相关技术的集合 .NET. Web Forms is a subset of that collection, encapsulating a particular programming model.
客户端框架: The browser tier may use code libraries or frameworks, which usually consist of JavaScript and CSS. 列出的客户端框架是jQuery和Bootstrap.
\n\n
Techniques: These items each involve different combinations of concepts mentioned above: AJAX, postback, 和验证.
\n\n
Note申请人不需要得出与这个列表完全相同的结论, 因为在术语上有一些歧义. However a discussion of these points can yield insight into the applicant’s thought process.
\n","identifier":3278937},{"questionBody":"
你的网站需要一些重复. 特别是:
\n\n
\n
相同的页眉和页脚将出现在大多数页面上
\n
有些页面需要标题的精简版本
\n
“立即捐赠”按钮和图片将只在其中四个页面上重复使用
\n
\n\n
您不希望重复代码, 对于每一个元素, 如何一次写完,然后在很多页上出现?
\n","answerBody":"
对于页眉和页脚,您可以使用母版页来定义模板. Then each content page can refer to the master page instead of repeating the header and footer.
\n\n
For the few pages that need a condensed header, you can use a separate master page.
\n\n
对于捐赠按钮,您将使用用户控件.
\n","identifier":3278938},{"questionBody":"
应用程序中的页面显示客户端列表, 每个都呈现为指向客户端详细信息页面的链接. 虽然大多数链接都有效, a bug has been reported that only affects client names containing the ampersand character, 比如“威利” & Sons”. 对于这些客户, 当你点击链接的时候, the client detail page only shows “Wiley” and cuts off the rest of the client name.
\n\n
为什么会发生这种情况?? 给出有关从列表页到详细页面的链接的技术细节.
\n","answerBody":"
A careless programmer forgot to URL-encode the URL in the “href” property of the link. 例如,链接可能在最终的HTML中被错误地呈现为:
What is wrong or suspicious about this analysis of a bug that you received from a tester? 你觉得问题出在哪里?
\n\n
数据库有问题. 我们可以在纸上重现这个问题 CustomerEdit.aspx. 每当用户编辑客户记录并错误格式化电话号码时, 并单击Save, 它显示了一个错误页面. 发生错误是因为浏览器向数据库发送了一个PUT请求, 但是客户表需要一个格式正确的电话号码. 如果格式错误,有时会出现SQL错误. 页面显示“无效索引:-1”. Also if I query the customer table, some of the phone numbers are not formatted right.
\n","answerBody":"
There are several statements that show the tester is not understanding the situation very well:
\n\n
\n
浏览器几乎不会直接与数据库通信.
\n
The HTTP PUT 动词不太可能与ASP一起使用.NET网页表格.
\n
这不太可能是数据库错误,因为:\n \n
It is possible, but unusual, to implement phone number formatting at the database level
\n
如果它是在那个层次上实施的, it would be unlikely to break in a manner that would allow some misformatted values into the database
When you implement some server-side behavior in response to selecting an item in the client dropdown, 一个新的bug突然出现了. The bug can be replicated by checking some of the boxes and then selecting a different client. 然后,之前选中的复选框将被清除. 为什么会发生这种情况??
\n","answerBody":"
The reason is most likely that a postback event was added to the client dropdown, 导致页面刷新, 但是复选框的视图状态没有正确地进行往返. 也就是说, 这些值没有包含在提交给服务器回发的表单中, 和/或在页面刷新期间不重新渲染.
\n\n
There are a couple complications with the page’s requirements that make this scenario likely:
\n\n\n
Checkboxes only send values to the server when checked and are simply omitted when cleared. 所有其他输入类型总是发送值.
\n
When a page requires a variable-length list of controls, it becomes harder to stay within the ASP.. NET编程模型, so programmers might resort to emitting the controls by code in a manner that does not participate in the round-tripping of values.
\n\n","identifier":3278941}],"publicUrl":"http://3hxf.aaay5.com/asp-dot-net/interview-questions","tabsSection":{"selectedTab":"client","items":[{"type":"client","label":"I'm hiring","activeIconUrl":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917097/active_icon/optimized/ICON_TALENT__ACTIVE__2x-64d6654dfad0c04528a0525c494b144f.png","activeIconData":{"original":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917097/active_icon/original/ICON_TALENT__ACTIVE__2x-64d6654dfad0c04528a0525c494b144f.png","md5":"64d6654dfad0c04528a0525c494b144f","size":1761,"width":68,"height":68,"filename":"ICON_TALENT__ACTIVE__2x.png","mimeType":"image/png","focalPoint":null},"optimized":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917097/active_icon/optimized/ICON_TALENT__ACTIVE__2x-64d6654dfad0c04528a0525c494b144f.png","md5":"64d6654dfad0c04528a0525c494b144f","size":1761,"width":68,"height":68,"filename":"ICON_TALENT__ACTIVE__2x.png","mimeType":"image/png","focalPoint":null}},"inactiveIconUrl":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917097/inactive_icon/optimized/ICON_TALENT__NON_ACTIVE__2x-8710ec2d9e5d5ba4f8f684771a271d5b.png","inactiveIconData":{"original":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917097/inactive_icon/original/ICON_TALENT__NON_ACTIVE__2x-8710ec2d9e5d5ba4f8f684771a271d5b.png","md5":"8710ec2d9e5d5ba4f8f684771a271d5b","size":1757,"width":68,"height":68,"filename":"ICON_TALENT__NON_ACTIVE__2x.png","mimeType":"image/png","focalPoint":null},"optimized":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917097/inactive_icon/optimized/ICON_TALENT__NON_ACTIVE__2x-8710ec2d9e5d5ba4f8f684771a271d5b.png","md5":"8710ec2d9e5d5ba4f8f684771a271d5b","size":1757,"width":68,"height":68,"filename":"ICON_TALENT__NON_ACTIVE__2x.png","mimeType":"image/png","focalPoint":null}}},{"type":"talent","label":"我在找工作","activeIconUrl":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917098/active_icon/optimized/ICON_CLIENT__ACTIVE__2x-9b251ec42929b7b96f7e20473b501eae.png","activeIconData":{"original":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917098/active_icon/original/ICON_CLIENT__ACTIVE__2x-9b251ec42929b7b96f7e20473b501eae.png","md5":"9b251ec42929b7b96f7e20473b501eae","size":2129,"width":68,"height":68,"filename":"ICON_CLIENT__ACTIVE__2x.png","mimeType":"image/png","focalPoint":null},"optimized":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917098/active_icon/optimized/ICON_CLIENT__ACTIVE__2x-9b251ec42929b7b96f7e20473b501eae.png","md5":"9b251ec42929b7b96f7e20473b501eae","size":2129,"width":68,"height":68,"filename":"ICON_CLIENT__ACTIVE__2x.png","mimeType":"image/png","focalPoint":null}},"inactiveIconUrl":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917098/inactive_icon/optimized/ICON_CLIENT__NON_ACTIVE__2x-de363650453eabe3d2c4e70e75deaaad.png","inactiveIconData":{"original":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917098/inactive_icon/original/ICON_CLIENT__NON_ACTIVE__2x-de363650453eabe3d2c4e70e75deaaad.png","md5":"de363650453eabe3d2c4e70e75deaaad","size":2120,"width":68,"height":68,"filename":"ICON_CLIENT__NON_ACTIVE__2x.png","mimeType":"image/png","focalPoint":null},"optimized":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/interview_questions_page/tabs_section/item/4917098/inactive_icon/optimized/ICON_CLIENT__NON_ACTIVE__2x-de363650453eabe3d2c4e70e75deaaad.png","md5":"de363650453eabe3d2c4e70e75deaaad","size":2120,"width":68,"height":68,"filename":"ICON_CLIENT__NON_ACTIVE__2x.png","mimeType":"image/png","focalPoint":null}}}]},"heroSection":{"title":"11基本ASP.NET面试问题","subtitle":"total source的基本问题是最好的ASP.NET开发人员和工程师可以回答这个问题. Driven from our community, we encourage experts to submit questions and offer feedback.","cta":{"label":"Submit an Interview Question","href":"#submit-question"},"ctas":{"client":{"label":"聘请顶级ASP.NET开发人员","href":"http://3hxf.aaay5.com/hire?interested_in=developers&skill=asp-dot-net&skill_job_title=ASP.NET+Developer"},"talent":{"label":"作为ASP申请.网络开发人员","href":"http://3hxf.aaay5.com/talent/apply?as=developers"}},"eatBadgeSection":{"iconUrl":"http://bs-uploads.toptal.io/blackfish-uploads/components/eat_badge_section/5876824/icon/optimized/toptal_logo_white_mono-df3f70ab3f3d7bf2e75fbe7a95401562.svg","iconData":{"original":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/eat_badge_section/5876824/icon/original/toptal_logo_white_mono-df3f70ab3f3d7bf2e75fbe7a95401562.svg","md5":"df3f70ab3f3d7bf2e75fbe7a95401562","size":3139,"width":49,"height":14,"filename":"toptal_logo_white_mono.svg","mimeType":"image/svg+xml","focalPoint":null},"optimized":{"url":"http://bs-uploads.toptal.io/blackfish-uploads/components/eat_badge_section/5876824/icon/optimized/toptal_logo_white_mono-df3f70ab3f3d7bf2e75fbe7a95401562.svg","md5":"df3f70ab3f3d7bf2e75fbe7a95401562","size":3139,"width":49,"height":14,"filename":"toptal_logo_white_mono.svg","mimeType":"image/svg+xml","focalPoint":null}},"label":"是顶级自由软件开发人员的专属网络吗, designers, 金融专家, 产品经理, 和世界上的项目经理. 顶级公司雇佣Toptal自由职业者来完成他们最重要的项目."}},"authorSection":null,"featuredContributors":null,"questionsSection":{"note":"面试不仅仅是棘手的技术问题, 所以这些只是作为一个指南. 并不是每一个值得雇佣的“A”候选人都能回答所有的问题, 回答所有问题也不能保证成为A级考生. 一天结束的时候, hiring remains an art, a science — and a lot of work.","banner":{"title":"申请加入Toptal的发展网络","subtitle":"并享受可靠、稳定、远程 自由ASP.网络开发人员 Jobs","cta":{"label":"申请成为自由职业者","href":"/talent/apply","gaCategory":"cta","gaEvent":"cta - interview_questions_block","gaLabel":"Apply to 自由ASP.网络开发人员 Jobs"}}},"successStorySection":null}
365体育铁路咨询European-Cup-online-sports-buy-ball-support@zhongdawuliu.netVenetian-platform-info@fangchentech.com不安定足彩外围体育博彩Euro-betting-billing@caiding.netGaming-platform-careers@tjxxsls.comGaming-platform-service@xinrongzhou.comGaming-platform-careers@korean-business-cards.com买球平台 快递人人才网Buy-ball-app-feedback@mexillonwines.com欧洲杯买球Perimeter-football-help@powerpraat.com商洛之窗美菜网同城8同城城分类信息网买球app万书网什么值得买_消费众测 清远赶集网最右中国书画网博远容天越秀南客运站南通热线官方网站一起写0460网站之家站点地图行行出状元电商资讯 新疆易登网嘻哈中国