Html add textbox-a label and a button control to a page

Assignment Help DOT NET Programming
Reference no: EM13766449

This exercise, you add a TextBox, a Label, and a Button control to a page. When you request the page in the browser, these server controls are transformed into HTML, which is then sent to the client. looking at the final HTML for the page in the browser, you'll see how the HTML is completely different from the initial ASP.NET markup.

1. Open the Planet Wrox project in Visual Web Developer.

2. In the Demos folder in the Solution Explorer, create a new Web Form called ControlsDeno. aspx. Choose your programming language and make sure the Web Form uses Code Behind.

3. Switch to Design View. From the Toolbox, drag a TextBox, a Button, and a Label control onto the design surface within the dashed lines of the <Env> tag that was added for you when you created the page.

4. Right-click the Button and choose Properties to open up the Properties Grid for the control. Pressing F4 after selecting the Button does the same thing. The window that appears, shown in Figure 4-2, enables you to change the properties for the control, which in turn influence the way the control behaves at runtime.

5. Set the control's Text property to submit xnformatson and set its In (which you'll find all the way down at the bottom of the list wrapped in parentheses) to surraitBut ton.

6. Change the ID of the textftox to YourName using the Properties Grid.

7. Clear the Text property of the Label using the Properties Grid. You can right-click the property' label in the grid and choose Reset, or you can manually remove the text. You can leave its ID set to Labell.

8. Still in Design View, double-click the button to have VWD add some code to the Code Behind of the page that will be fired when the button is clicked in the browser. Add the bolded line of code the code block that VWD Inserted for you:
VB.NET

Protected Sub SUbmitButton_Click(ByVal sender As Object,
ByVal a As System.EventArgs) Handles SubmitButton.Click

Labell.Text ="your name is + & YourName.Text;
End Sub
CO
protected void SubmitButton_Click(object sender. EventArgs e)

{

labell.Text =" your name is " = YourName.Text;

}

Note that the VB.NET example doesn't need an underscore here to split the code over two lines. In previous versions of VB.NET the underscore was required to split this code over two lines.

9. Save the changes to the page and then open it in the browser by pressing Ctrl+F5. When it appears in the browser, don't click the button yet, but open up the source of the page by right-clicking the

page in the browser and choosing View Source or View Page Source. You should see the following HTML code Cl changed the formatting slightly so the HTML fits on the page):
<div>

Your name <input name="YourName" type‘=text" id="YourName" /> <input typea"submit" name="Submitblutton= valuen=Submit Information" id="SubmitButton" />
<br />
<span ido="Labell"></span>
</die>

10. Switch back to your browser, fill in your name in the text box, and click the button. When the page is done reloading, open up the source for the page in the browser again using the browser's right-click menu. The code should now look like this:
<diva
Your nano <input nama.

Your name type=text= value="imar" id=Yourname />

<input type=submit name"=SubmitButton" value="Submit information" id="SubmitButton" />
<br />
<span ids"Labell=>Your sans is Imar</span>
< div>

Reference no: EM13766449

Questions Cloud

Reducing overhead costs : Perform an Internet search using the phrase "reducing overhead costs". Select and read a case study or article from the results of your search. (Make sure that you do not select an instructor's lecture notes or a class assignment from the results ..
Discuss the similarities and differences between organisms : Similarities and DifferencesDiscuss the similarities and differences between organisms in the domains Bacteria and Archaea.Your assignment should be 250-500 words in length.
What defenses will the bank assert : Write a 400 to 500 word essay about, Mark sued a bank for injuries. He was not paying attention as he entered the bank because he was looking at his phone. And he fell suffering $10,000 in injuries. What defenses will the bank assert
Transfer-tax system : There are surprised, and a little confused, when you mention that their heirs might end up receiving only a fraction of those assets after the two of them pass away.
Html add textbox-a label and a button control to a page : This exercise, you add a TextBox, a Label, and a Button control to a page. When you request the page in the browser, these server controls are transformed into HTML, which is then sent to the client. looking at the final HTML for the page in the b..
Explain the aida concept and how the sales team can help : Explain the AIDA concept and how the sales team can help support other elements of the marketing communications mix in moving potential clients through this process.
Problems based on motivational theory : Choose Maslow's, Herzberg's, or McClelland's model of motivation, and argue the primary reasons why it is applicable to the Kaluyu Memorial Hospital scenario.
Identify the various types of grains and grain-based product : Identify the various types of grains and grain-based products that contain the "whole" form of the grain. As part of this discussion, also consider some of the barriers to whole grain consumption.
Mistakes in processing account transactions : Identify the key steps in the closing process that provide the most opportunity to make mistakes in processing account transactions. Make at least two (2) recommendations for improving the accuracy and reliability of the information in the gaps th..

Reviews

Write a Review

DOT NET Programming Questions & Answers

  Write a program that computes the amount of money

Write a program that computes the amount of money the computer club will receive from proceeds of their granola bar sales project. Allow the user to enter the number of cases sold and the sale price per bar. Each case contains 12 bars; each case is p..

  1 develop and test a web services based application that

1 develop and test a web services based application that meets the following requirements applying soa design

  Prepare a marymount faculty site and you have each been

prepare a marymount faculty site and you have each been provided a professor to profile.nbsp you have to use html5 and

  Write a function to convert the two dimensional coordinates

write a function to convert the two dimensional coordinates of a point from cartesian system to polar system by using x and y as its parameters

  Concepts of home directory

In this lab you will learn the concepts of home directory, working directory, absolute pathname, and relative pathname. You will learn to use cd to make another directory the working directory, pwd to display the name of the working directory, rm ..

  A company wants to see a printout

A company wants to see a printout of the gross payroll for each of its 7 departments. The output should be a list of the seven departments and the total gross payroll (rate times hours) for each department

  Build a virtual think-a-dot in visual basic 2010

As originally constructed, a marble could be dropped into one of three holes in the top of the machine. It would then percolate through the machine and come out a hole on the bottom left or right.

  Best way to code radio buttons that when

What is the best way to code radio buttons that when you check a checkbox, the radio buttons become active and add a cost to the Labor Price. I already have the buttons enabled when you select muffler, I can't figure out how to code the radio butt..

  C# visual basic 2012 design stick figure for hangman game

Hangman is a favorite childhood game. using C# visual basic 2012 Design the stick figure for this game

  Application that includes three arrays

Design an application that includes three arrays of type int. Allow the user to enter values into the first two. Write a method to store the product of the two arrays in the third array

  Topic using net resources to teach netthis project will use

topic using .net resources to teach .netthis project will use the .net framework to produce a set of materials to

  Write a constructor that accepts arguments

Write a constructor that accepts arguments for each property. The application should create an array of three RetailItem objects containing the following data

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd