Step by Step

Wednesday, June 15, 2011

How server see attributes



  How server attributes end up in the browser?
 Example:
 TextBox server control:

<asp:TextBox AccessKey=”a” BackColor=”Black” ForeColor=”White” Font-Size=”30px” 
  BorderColor=”Yellow” BorderStyle=”Dashed” BorderWidth=”4” CssClass=”TextBox”
  Enabled=”True” Height=”40” Width=”200” TabIndex=”1” ToolTip=”Hover text here”
  Visible=”True” ID=”TextBox1” runat=”server” Text=”Hello World”>
</asp:TextBox>

When you request the page with this control in the browser, you end up with the following HTML:

<input name=”TextBox1” type=”text” value=”Hello World” id=”TextBox1” accesskey=”a”
  tabindex=”1” title=”Hover text here” class=”TextBox” style=”color:White;
  background-color:Black;border-color:Yellow;border-width:4px;
  border-style:Dashed;font-size:30px;height:40px;width:200px;” />




List Of Common Server Properties




Common properties for all Server Controls


Common properties for all Server Controls
Most of the server controls share some common behavior.
Part of this behavior includes the so-called properties that define the data a control can contain and expose.
ID-> uniquely identify it in the page
 Runat-> attribute that set to Server to indicate the control should be processed on the server
 ClientID-> contains the client-side ID attribute that will be assigned to the element in the final HTML.
Note:
 In versions of ASP.NET up to 3.5 this ClientID was always generated for you automatically. However, in ASP.NET 4 a new ClientIDMode property has been introduced that gives you more control over the ID of an element at the client.  

Tuesday, June 14, 2011

Customizing Keyboard shortcuts


Customizing Keyboard shortcuts

Keyboard shortcuts are a good way to save time because they allow you to perform a task with a simple keyboard command instead of using mouse.
 To change the keyboard shortcuts, choose Tools Options, expand Environment, and click Keyboard. Locate the command for which you want to change the shortcut in the list with commands.
Next, in the Press Shortcut Keys field, type a new shortcut and click Assign. VWD allows you to enter a double shortcut key for a single command. For example, you can bind the command Close All Documents to the command Ctrl+K, Ctrl+O. To perform this command, you need to press both key combinations in rapid succession. Although a double shortcut key may seem like overkill, it greatly increases the number of available shortcut keys.





Sunday, June 12, 2011

Different Windows you work with it in VS


Different Windows you work with it
1-The Error List
The Error List gives you a list of the things that are currently somehow broken in your site, including incorrect markup in your ASPX or HTML files and programming errors in VB or C# flies. This window can even show you errors in XML and CSS flies. The Error List shows its messages in three categories — Errors, Warnings, and Messages — that signify the severity of the problem


2-The Output Window
When you try to build your site using the Build menu, the Output window tells you whether or not the build succeeded. If the build failed, for example because you have a programming error, it tells you why the build failed. In the commercial versions of Visual Studio, the Output window is used for other information as well, including the status of external plug-in programs. Building — or compiling — web sites is discussed later in this book, including Chapter 19, which deals with deployment of your web site.
3-The Find Results Window
The Find and Replace features of VWD are invaluable tools when it comes to managing the content of your site. You will often need to replace some text in the current document or even in the entire site. Find in Files (Ctrl+Shift+F) and Replace in Files (Ctrl+Shift+H) both output their results in the