ASP Standard Controls

Manzoor Ahmed
A free video tutorial from Manzoor Ahmed
Microsoft Certified Trainer
4.3 instructor rating • 11 courses • 112,502 students

Learn more from the full course

The Complete ASP.Net Web Forms with ADO.Net From Scratch

Rapid Web Application Development Using Asp.Net

09:33:46 of on-demand video • Updated November 2015

  • Creating a project and running in web browser
  • Working with standard controls
  • Working with Data controls
  • Working with validation controls
  • Working with Master pages
  • Working with Navigation controls
  • Working with Login controls
  • Understanding session management technique.
  • Understanding web.config file and machine.config
  • Working with client side reports
  • Working with Datareader in Ado.Net
  • Working with Dataset in Ado.Net
English [Auto] Hello I'm going to show you the standard controls so I'm starting a new project called the standard candles. OK and I'll come on my default page and I'll just close the solution explorer. Now I have many standard controls. The first one is low but I'll go back and drop label the label is used to display some static text or I can assign some text dynamically on the label. So if it is used to display some messages or text from all the text of the label to be number one. So I'm going to name it does and I'll be number one. So whenever I drag a control I should name it. So the name of the control is nothing but the same name and display. So I go to level one on one and I take a text box. And in this text box I can write any text. So like Diaghilev the text was B the x d number one. And when did I get my number one in this text box in the same way. I'll take one more. But there is nothing but two and a lady dies and B have. And a text box and dice the XTi to the big one button and the text of the button say and Id see Betty in hand. Now you might have understood what is it I'm trying to do not accept 2 digits or 2 numbers from two boxes. And when I click and add and I want it to display the result on the label I'll just name it as the end of it and the text. I don't want to display any things tactically it is going to be dubbed dynamic text. Whatever I get the result and it is just that I don't know what I could add but if I get any minute. But now I don't even know what is that I need to do I need to read the values of x 1 and X walks to improve pitiable rubidium so say that A and B I have two variables and one more variables see where I want to store the result and I'll say it equals to X the Eckstine number one text as you know that wanted what I need from the keyboard. That is a war for a country even though it will be strange. I cannot string an integer. So definitely I need to parse it. I'll say in dark pass the same way I'll be reading the value in that box. He extremum to text and C equals a Class B and perform the operation of hey listen I'm going to wait and see. I don't want to display that don't see on the label results says it will be a result dark text. That means I want to change the text or I don't want to give that text to the label so I'll say Albiol a. Text equals to see again. In India and pigsties in string. I cannot assign an integer of the string. Like I can not assign a string to include it in the same way. I can not assign a string as to what the string being deleted with the help of parse the same v India can be converted to a string with the help of a dot with string to string that type. So I'm using boosting better than one to in a string format. The saved is an exit to this so I have nothing but text box that quantify the 79 78 in this and I say click on that. There should be a reason. So I get to wondering if that is the addition of these two numbers. If I want to display some message along with the result I can just happen that I will see my result is so and so and this is F5. So it is going to be semi-desert is the value of five and seven as it had my dirty wondering. So this is very similar I can use X-Boxes and Baden's in this way and I can perform some basic operations. So these are the basic controls quite a lot of time to control that we have no link but link but it is not in but it is a button which looks like a link. So just simply name it does. OK. But in between ADD and text that the text to be had. So it looks like a link but you know what I click on it is going to perform like button so it will have a click event. Same way as we have but then click event in the same building but an event is available. I'll simply open discord and I'll paste here. Save this so that even on this link. But I'm going to perform the same operation. I'll write some numbers here and click on that. So I got my result is this so it looks like a link but it works like a button and so does anything but a burden. And I have another control policy image button. So again this is also a button which looks like image and it's like a button. And I want to have an image working like a button so I can simply get any meds from some. So I got the image start image and I just click on the button right click properties. I should name it as I am the BE and image button add and the image you want I can give it to the help of property image you simply browse this and then select start the image and it OK I got a stop image here. If I only see maybe I'll get even. As for the button you can simply copy the same old pasted here. So now I have got three buttons. One is the normal but there is a lean button and one more intimate. But though I can click on stumblebum So I'm getting that is it. So I have three buttons which has different looks but it works the same way. Now we will see it for dropdown list now and just drag and drop drop down list not try to understand it. I've done this carefully because if at all you get to perfect in this dropdown list then you can probably work with this box take box. There's really a list almost all the lists that we have. You can work easily. Now I have my drop down list or just go to the properties and I and I mean does the qualification now venom when I select the dropdown list it shows a small button within item. This but because it does smart back on this it is going to open at least in which I have to it source. And a lot of the back and any guidance on any guidance I can add the items to just don't list. So our last four items the first item let it be as select and the value of it be zero. And the second item name because V-Tech let its value be done. The third as em back and let its value be 20. And the third is B C D and give the value to this as 30 not try to observe this carefully. We have three properties that we need to understand. One is the text and then there is value and the third one is index. Now I have selected beating no the selected text. It is B.Tech or against selected item is B.Tech selected value is then and selecting the next one in the same way. If I set like this now the selected item is M.Tech selected value is 20 and selected indexes. These are the three basic properties of any list that you need to understand and be able to work with it. So hope you might have understood that if I said the the I have selected I must be at the silicon value is 30 and the selected indexes 3. I will just say OK I'll dig a button. Probably I'm not going to name and I'm not going to give any idea and all most things here. Other thing that actually I'll just double click the button and button click. I want to display this three things and I'll display that to a level they can at that level named dies. Go to the properties and add in the middle B and B the result and then the next be. Now click the button and I'm going to add all these things to the label. So probably to do that. I'll be building a string. I'll be creating a string as a screen as equals to drop down list. The real qualification Daut selected index was to follow the beginning index selected in next door to a string. So I'll prefix it with text or I can say I can open the index with text that does nothing but index is so probably it is going to show me the selected index. So if the value is going to be stored in S and that is what I'm going to display on LBA deals with old guard text equals to S S is a thing I need not to do any changes. The fact that these what I really like be zero. Like I said it could be Dec. So this is what if I send a query to the selected indexes. So you might to understood this line the same way. I will display the selected item they want to work with selected item and simply should say selected item not with string. I just saved this file now that I correct the mistakes. Select B Deck B is D. Now in the same way if I want to display the selected value I'll just rename this or just change the script property that is nothing but select that value dropdown list qualification not selected value and just keep the text has value and keep a little space. This is by value is 0. This value then its value is 20. It displays all the values I want to display. All the things so I can simply go for appending the string. I'll just copy pasted and test it and get a B or tag so that this thing I should get it in the new line. So I'll just give a B or tab so it works like selection and here the text is and the selected item in the same way. I'll give one more to be or here and get I say instead of value as the index is and I'm to Jane this with index. So this is a very simple one that I have haven't the same strain. I need to go for less equal to that means I want to put the all value plus this new back to me all the three things at once that reflected a value selected item selected index value 0 text is sakte indexes deedle values 20 next to them back in Texas too. So this is very simple. In the same sense and again what with all the other controls like I just go for listbox everyday items I can add one two three for as many items as I want. So I'll say See I can have multiple selections of 10 C++ drinky the Shaab I said 13. And finally just say what the. And I'll just save it. OK. And I'm going to take this even how we got all this because I can select any one among my people. Now I can also go for selecting multiples just Google the properties and gender selection more from single to multiple lexical pest control and select one pest control and select. I can go for multiple solutions. One more thing like I have the dropdown list I'll select this and click the button. It is going to display that. Now I don't want to wait for another click whenever I change. I don't from the drop down list. It should be slimmy just thinks that means what I wanted is performing on a button it should perform on dropdown list item. Jane all I can see a dropdown list selected index change event of dropdown list will also have an event like your button has a click event in the symbol dropdown list will have selected the next in your mind and double click the drop of a list you'll get back and next thing you're in the same court I can write it in selecting the next thing you want to copy. This is Tanak security monitor see that he displays the result was online. So how you came to be like I said. That is what it is going to explain why. Because when I click the button it makes a fall back you can see that the page gets refreshed. You can see you can observe this the page icon. If I click button it gets to be on there. That means it is making a post back but whenever I change the item of the dropdown list you do not reloading that message didn't want making a pause. Now what they want is ventilating the item in the drop down list. It should make it both back automatically regarded as auto pause back. So how do I do that I can simply go to the Smart back and healthy and able to pull back. That's it. I like the this this ball it's looking this is very simple. This is what we do of vog with your dropdown list in the same way I can go forward working with listbox selector and exchange event and I can have the same code and I can walk as I have been dubbed on this and even I can go find it without pulling back the same since I have checked both list click on checkbox. Double click on the checkbox list. I can simply say that items I can add one two three four as many as they want. I can have selected text all of the things as you would. So I'll say I had the value be 10 subsect but I bet you'll be doing the you by the value b b c I can add meaning what I did just remove this Bostonian just name and multiply and likely to be the to say OK now I got a checkbox list with four items in it. I can simply click on this I can have all these four items in my check boxes. Now I can arrange them in what is in the order that I go with the properties I like and say go to the properties and I'll say that action is harder than I can get in the same way I can work with radio buttons to list items that they can add as many as I want. I can see OK the same way I'll have all of your buttons and it is going to select one among my people. So it will have mutually exclusive selection so that this or this or this anything in the same way as we have wanted them to lower your vision for them tick box in the same way I can have the ability and vision for the. But then as the even I can arrange my check list in table form like two rows two columns in that way I can see the repeat column says zero. I'll make it to 2. So my is to those two columns in the same way I can proceed as I like. I can go for the repeat column yesterday for whatever I want. So I can have a set of commands. So finally at last I'm going to show you multiple selections how it works and I will complete my review of that. Like if I select one two three are you going to work like call. Also they go for Button click and I read what all the items are being checked. So it's very simple. I'll do one thing as they call button and this button click. I did just right for each for each list item and I say box list one dot items you can see that all the items in the list are the collection Clotho for this becomes Travis that say this and I'm going to check if I got selected equals to the select if the selection is true then simply say I do this thing. So my string let my spring be think equals now and he had I say Kate plus two equals two. I like Dot text not with theme so I am Wynkoop to all the elements and I'm going to check the first one. Has it been selected. If it is selected added to this string and I get Guess say and I can simply give it B so that we can have a new line up every element got selected. So what is there going to do. It is going to look to all the elements of the box or all the items of checkbox and it is where we when I figure that if it is selected. I like it. OK. If it is not Silicon Alley just leave it. So off my loop I'm going to display this on my screen. So hardware display I can just leave with the help of the label and I can assign it to the text or I can simply say or respond or write like we have canceled or right lane in C-sharp in the same way I have respond or write a song or write. It is when you write it on the screen and just exactly this select submit and do. And I'll just click the button you can see that this thing stubbornly. The fighting will stop and click the button. It will be there to be read by the people. This should not display anything I said at all it is just being Sabaidee multiplied so much people selection and this is how you get to work in the same way like if you wanted to work with listbox you can go in the same sense for single select. It is simply video but at least one box selected a value as we have got Gaullist one set their value. Even I can write articles even for tick box lists. I have written for dropdown list so I hope you might have understood this. You can go to this video once again if at all you'll find some confusions so confusion will be cleared. So this is how all of you are the list controls once so. Thank you very much.