Docstoc

ASPNET notes

Document Sample
ASPNET notes Powered By Docstoc
					Designing an ASP.NET Application for the COMPANY Database
    1.   Create a new ASP.NET web Project. Assign the name: webCompany.
    2.   Rename the first form (WebForm1.aspx) and called DEFAULT.aspx
    3.   Construct the following GUI for the DEFAULT.aspx web-form




                Controls to be added                  Properties
                                     txtLastName
                                      txtPassword
                                         txtStatus
                                         btnLogIn
                          RequieredFieldValidator1    ControlToValidate: txtLastName
                                                      ErrorMessage: << User Name is required
                           RequieredFieldValidator2   ControlToValidate: txtPassword
                                                      ErrorMessage: << Password is required

    4.   Attach the following code to the btnLogin button

Private Sub btnLogIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles btnLogIn.Click
      Try
         'Verify the validity of the given User/Password combination
         'Using: (LastName / SSN)
         '----------------------------------------------------------
         'Dim myAccessCnnStr As String = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=c:\myData\CompanyXP.mdb"
         Dim myOracleCnnStr As String = "Provider=MSDAORA;Data Source=orcl;User ID=csuPerson;Password=euclid"
         Dim myCnn As New OleDb.OleDbConnection
         Dim mycmd As New OleDb.OleDbCommand
         myCnn.ConnectionString = myOracleCnnStr
         myCnn.Open()
         mycmd.Connection = myCnn
         mycmd.CommandType = CommandType.Text


                                                                                                             V. Matos – ASPNET - 1
      'Access SQL code (use UCASE(...) LCASE(...) functions
      'Oracle SQL code (use UPPER(...) LOWER(...) functions
      mycmd.CommandText = " select count(*) from employee " & _
                    " where UPPER(Lname)= '" & UCase(Me.txtLastName.Text) & "' " & _
                    " and SSN = " & Me.txtPassword.Text

      Dim myRecCount As Integer
      myRecCount = mycmd.ExecuteScalar

     If myRecCount = 1 Then
        'store the user name into a session variable
        Session.Item("TheUser") = Me.txtLastName.Text
        'show the main menu form
        Server.Transfer("webForm2.aspx")
     Else
        Me.txtStatus.Text = " Invalid userName/Password - Try again "
     End If
  Catch ex As Exception
     Me.txtStatus.Text = ex.Message
  End Try
End Sub



 5.   Test the form.




                                                                                       V. Matos – ASPNET - 2
    6.   Make a new web form. Call it “webForm2.aspx”. The form should look like the following GUI.




    7.   Add the following code to the click event of the four buttons inside the webForm2


Private Sub btnShowWorkLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowWorkLoad.Click
      Server.Transfer("WebForm3.aspx")
End Sub

  Private Sub btnShowEmployee_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowEmployee.Click
     'under construction
  End Sub

  Private Sub btnPrintEmployee_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintEmployee.Click
     Server.Transfer("WebForm5.aspx")
  End Sub

  Private Sub btnGoogle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGoogle.Click
     Response.Redirect("http://WWW.GOOGLE.COM/")
  End Sub




                                                                                                                                  V. Matos – ASPNET - 3
8.   Create a new form called WebForm3.aspx. It will take care of displaying and maintaining the WORKS_ON data. The layout
     of the table should be similar to the following screen




9.   When designing the form, right-click on the DataGrid. Pick the entry “Property Builder” and add the following Bound
     fields, links, and controls.

     Type                   Header Text             Text Field
     Hyperlink Column       Employee SSN            ESSN (Read Only)
                                                    (URL Field: ESSN)
                                                    (URL Format string: WebForm4.aspx?ESSN={0} )
     Bound Column           Project No.             PNO (Read Only)
     Bound Column           Hours/Week              Hours
     Button Column          Edit, Update, Cancel
     Button Column          Select




                                                                                                               V. Matos – ASPNET - 4
  10. Add the following code to the WebForm3.aspx page.



'ACCESS
'Dim myStrConnection As String = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=c:\Access-Data\CompanyXP.mdb"
'ORACLE
Private myStrConnection As String = "Provider=MSDAORA;User ID=csuPerson;Data Source=ORCL;Password=euclid"

Private mySQL As String = "SELECT Essn, Pno, Hours from Works_On "
Private myTableName As String = "Works_On"
Private myConnection As OleDb.OleDbConnection

Private Sub Page_Load(ByVal Sender As System.Object, ByVal E As System.EventArgs) Handles MyBase.Load
   If Not IsPostBack Then
      'if this is the first time then LOAD the grid with WORKS_ON data
      LoadGrid()
   End If
End Sub

Private Sub LoadGrid()
   Connect()
   Dim myAdapter As New OleDb.OleDbDataAdapter(mySQL, myConnection)
   Dim myDS As New DataSet
   myAdapter.Fill(myDS, myTableName)
   Disconnect()

  dgWorksOn.DataSource = myDS.Tables(myTableName)
  dgWorksOn.DataBind()
  Session.Item("theTable") = myDS.Tables(myTableName)
End Sub

Private Sub Connect()
   If myConnection Is Nothing Then
      myConnection = New OleDb.OleDbConnection(myStrConnection)
   End If

  If myConnection.State = ConnectionState.Closed Then
     myConnection.Open()
  End If
End Sub



Private Sub Disconnect()
    myConnection.Close()
 End Sub

Public Sub EditRecorddgWorksOn_EditCommand(ByVal source As Object,
           ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgWorksOn.EditCommand
  dgWorksOn.EditItemIndex = e.Item.ItemIndex
  LoadGrid()
End Sub

Public Sub dgWorksOn_CancelCommand(ByVal source As Object,
           ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgWorksOn.CancelCommand
  dgWorksOn.EditItemIndex = -1
  LoadGrid()
End Sub

Public Sub dgWorksOn_UpdateCommand(ByVal source As Object,
           ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgWorksOn.UpdateCommand

   ' Retrieve the field values in the edited row
   Dim theSSN As Long = CType(e.Item.Cells(0).Controls(0), HyperLink).Text
   Dim thePNO As Long = CType(e.Item.Cells(1).Text, Long)
   Dim theHours As TextBox = CType(e.Item.Cells(2).Controls(0), TextBox)

  dgWorksOn.EditItemIndex = -1
  UpdateAssignment(theSSN, thePNO, theHours.Text)
End Sub

Private Sub UpdateAssignment(ByVal theSSN As Long, ByVal thePno As Long, ByVal theHours As Decimal)
   'create a DataSet using the SQL select statement
   Connect()
   Dim myAdapter As New OleDb.OleDbDataAdapter(mySQL, myConnection)
   Dim myDS As New DataSet
                                                                                                               V. Matos – ASPNET - 5
  myAdapter.Fill(myDS, myTableName)
  Disconnect()

  'sequentially navigate the table looking for the record to be updated
  Dim myTable As DataTable
  Dim myrow As DataRow
  Dim i As Integer
  myTable = myDS.Tables(myTableName)
  For i = 0 To myTable.Rows.Count - 1
     myrow = myTable.Rows(i)
     If myrow("ESSN") = theSSN And myrow("Pno") = thePno Then
        myrow.BeginEdit()
        myrow("Hours") = theHours
        myrow.EndEdit()
        Exit For
     End If
  Next

  'Reconnect the DataSet and update the database
  Dim myCmdBuilder As New OleDb.OleDbCommandBuilder(myAdapter)
  Connect()
  myAdapter.Update(myDS, myTableName)
  Disconnect()

  'attach dataGrid to dataTable
  dgWorksOn.DataSource = myDS.Tables(myTableName)
  dgWorksOn.DataBind()
  Session.Item("TheTable") = myDS.Tables(myTableName)
End Sub

Private Sub dgWorksOn_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs)
Handles dgWorksOn.DeleteCommand
   ' Retrieve the SSN and Project No. of the record to be deleted
   Dim theSSN As Long = CType(e.Item.Cells(0).Controls(0), HyperLink).Text
   Dim thePNO As Long = CType(e.Item.Cells(1).Text, Long)

  dgWorksOn.EditItemIndex = -1
  DeleteAssignment(theSSN, thePNO)
End Sub

Private Sub DeleteAssignment(ByVal theSSN As Long, ByVal thePno As Long)
   'OBSERVATION ---------------------------------------------------
   'a better alternative is to issue a DELETE-FROM-WHERE...
   'inside() a Command object.
   '---------------------------------------------------------------

  'create a DataSet using the SQL select statement
  Connect()
  Dim myAdapter As New OleDb.OleDbDataAdapter(mySQL, myConnection)
  Dim myDS As New DataSet
  myAdapter.Fill(myDS, myTableName)
  Disconnect()

  'Sequentially navigate the table looking for the record to be updated
  Dim myTable As DataTable
  Dim myrow As DataRow
  Dim i As Integer
  myTable = myDS.Tables(myTableName)
  For i = 0 To myTable.Rows.Count - 1
     myrow = myTable.Rows(i)
     If myrow("ESSN") = theSSN And myrow("Pno") = thePno Then
        myrow.Delete()
        Exit For
     End If
  Next

  'Reconnect the DataSet and update the database
  Dim myCmdBuilder As New OleDb.OleDbCommandBuilder(myAdapter)
  Connect()
  myAdapter.Update(myDS, myTableName)
  Disconnect()

  'Attach dataGrid to dataTable
  dgWorksOn.DataSource = myDS.Tables(myTableName)
  dgWorksOn.DataBind()
  Session.Item("TheTable") = myDS.Tables(myTableName)
End Sub

                                                                                                                      V. Matos – ASPNET - 6
Private Sub btnAddNewAssignment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddNewAssignment.Click
   Connect()
   Dim myCommand As New OleDb.OleDbCommand
   myCommand.CommandText = "INSERT INTO WORKS_ON VALUES (" & _
                    txtESSN.Text & ", " & _
                    txtPNO.Text & ", " & _
                    txtHOURS.Text & ") "
   myCommand.CommandType = CommandType.Text
   myCommand.Connection = myConnection
   Dim myRecAffected As Integer
   Try
      myRecAffected = myCommand.ExecuteNonQuery
      If myRecAffected = 1 Then
         txtSpy.Text = "Successful insertion"
         LoadGrid()
      Else
         txtSpy.Text = ("Insertion did not work well")
      End If
      Disconnect()
   Catch ex As Exception
      txtSpy.Text = ex.Message
   End Try

End Sub


Private Sub btnSpying_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
   Dim t As DataTable
   t = Session.Item("TheTable")
   Dim r As DataRow
   txtSpy.Text = ""
   For Each r In t.Rows
      txtSpy.Text &= r("ESSN") & " - " & r("PNO") & " - " & r("HOURS") & vbCrLf
   Next
End Sub

Private Sub dgWorksOn_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs)
Handles dgWorksOn.ItemCommand
   'Just tracing the GRID…
   Dim theSSN As Long = CType(e.Item.Cells(0).Controls(0), HyperLink).Text
   Dim thePNO As Long = CType(e.Item.Cells(1).Text, Long)
   Dim WhoCalledMe As String = (CType(e.CommandSource, LinkButton)).CommandName
   Me.txtSpy.Text = theSSN & " " & thePNO & " " & WhoCalledMe
End Sub



  11. Drill-Down Operations. If you click on a particular Employee SSN displayed in the form above (say 123456789), the
      hyperlink action will take you from WebForm3 to WebForm4. Local data present in WebForm3 could be passed on the call to
      WebForm4 using the Request.QueryString object (this is what URL Text Format Field = webFOrm4.aspx?ESSN={0} does).
      The following form (webForm4.aspx) illustrates the process of extracting the <Field=Value> pairs transmitted in a call to
      the page.

                                                      Private Sub btnShowArrivingData_Click
                                                                 (ByVal sender As System.Object,
                                                                  ByVal e As System.EventArgs)
                                                                  Handles btnShowArrivingData.Click

                                                       Dim i As Integer

                                                       For i = 0 To Request.QueryString.Count - 1
                                                           Me.txtSpy.Text &= Request.QueryString.GetKey(i) & vbCrLf
                                                           Me.txtSpy.Text &= Request.QueryString.Get(i) & vbCrLf
                                                       Next

                                                      End Sub




                                                                                                                          V. Matos – ASPNET - 7
   12. Report processing. Make a new webform (call it WebForm5) and place on it a CrystalReportViewer control. The control
       appears as a gray panel and has no formatting capabilities. You need to write code to instantiate the report, associate it to
       the viewer, and finally show its pages (see appendix on How to create a report using CrystalReport).

       Put the following code on the Page_Load event for WebForm5.aspx

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim r As New CrystalReport1
        Me.CrystalReportViewer1.ReportSource = r
        r.SetDatabaseLogon("csuperson", "euclid")
        Me.CrystalReportViewer1.ShowFirstPage()
    End Sub




                                                                                                                       V. Matos – ASPNET - 8
Classic ASP Model
                         ASP Server

              Request    Application


                                           Contents
                                           (collection)




                         Session


Client        Response




(Internet
Explorer,
Netscape,                Server
etc.)




                         Local Resources
                          Databases
                          Graphics
                          Documents
                          Email
                          etc.




                                                          V. Matos – ASPNET - 9
                                                                               These notes are taken from www.Microsoft.com Knowledge Base




                                                      APPENDIX
DataGridCommandEventArgs Class

Provides data for the CancelCommand, DeleteCommand, EditCommand, ItemCommand, and UpdateCommand events of the
DataGrid control.

       The CancelCommand event is raised when the Cancel button for an item in the DataGrid control is clicked.
       The DeleteCommand event is raised when the Delete button for an item in the DataGrid control is clicked.
       The EditCommand event is raised when the Edit button for an item in the DataGrid control is clicked.
       The ItemCommand event is raised when any button for an item in the DataGrid control is clicked. This allows you to
        programmatically test for when a specific command button is clicked and take appropriate action. This event is commonly
        used to handle custom command buttons for the DataGrid control.
       The UpdateCommand event is raised when the Update button for an item in the DataGrid control is clicked.

Example. Assume the Delete control is clicked on the first row of the example DataGrid.



                                            Private Sub dgWorksOn_DeleteCommand (ByVal source As Object,
                                                        ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs)
                                                        Handles dgWorksOn.DeleteCommand

                                                 ' Retrieve the SSN and Project No. of the record to be deleted
                                                 Dim theSSN As Long = CType(e.Item.Cells(0).Controls(0), HyperLink).Text
                                                 Dim thePNO As Long = CType(e.Item.Cells(1).Text, Long)

                                                 dgWorksOn.EditItemIndex = -1
                                                 DeleteAssignment(theSSN, thePNO)
                                            End Sub

                                            Private Sub DeleteAssignment(ByVal theSSN As Long, ByVal thePno As Long)
                                                  'OBSERVATION ---------------------------------------------------
                                                  'a better alternative is to issue a DELETE-FROM-WHERE...
                                                  'inside() a Command object.
                                                  '---------------------------------------------------------------

                                                 'create a DataSet using the SQL select statement
                                                 Connect()
                                                 Dim myAdapter As New OleDb.OleDbDataAdapter(mySQL, myConnection)
                                                 Dim myDS As New DataSet
                                                 myAdapter.Fill(myDS, myTableName)
                                                 Disconnect()

                                                 'Sequentially navigate the table looking for the record to be updated
                                                 Dim myTable As DataTable
                                                 Dim myrow As DataRow
                                                 Dim i As Integer
                                                 myTable = myDS.Tables(myTableName)
                                                 For i = 0 To myTable.Rows.Count - 1
                                                    myrow = myTable.Rows(i)
                                                    If myrow("ESSN") = theSSN And myrow("Pno") = thePno Then
                                                       myrow.Delete()
                                                       Exit For
                                                    End If
                                                 Next

                                                 'Reconnect the DataSet and update the database
                                                 Dim myCmdBuilder As New OleDb.OleDbCommandBuilder(myAdapter)
                                                 Connect()
                                                 myAdapter.Update(myDS, myTableName)
                                                 Disconnect()

                                                 'Attach dataGrid to dataTable
                                                 dgWorksOn.DataSource = myDS.Tables(myTableName)
                                                 dgWorksOn.DataBind()
                                                 Session.Item("TheTable") = myDS.Tables(myTableName)
                                            End Sub

                                                                                                                          V. Matos – ASPNET - 10
Columns, DataGrid Properties Dialog Box

                                                   The Columns tab of the DataGrid Properties dialog box allows you to:


                                                           Specify which data columns appear in the grid.
                                                           Define columns for special functions such as editing and selecting items.
                                                           Define template columns.
                                                           Specify column-specific information for individual columns, such as a sort
                                                            expression and command name.
                                                           Define the header and footer, contents, and data binding for each column
                                                            in the grid.

                                                   After defining a column, you can set its properties. The options available on the
                                                   Columns tab change according to what type of DataGrid column you are
                                                   working with.




You can open the DataGrid Properties dialog box by selecting the DataGrid control in your Web Forms page, opening the
Properties window, and choosing Property Builder at the bottom of the window.

Create columns automatically at run time
        Specifies whether the grid, at run time, includes all the data fields from the data source to which it is bound. You cannot
        remove or format these columns.

         You can add columns, including both data-bound columns and button, hyperlink, and template columns, as described below
         in "Column List". Any columns you add appear to the left of the columns generated automatically.




Column List

The column list allows you to specify what columns appear in the grid. You can add fields from the data source and various types of
buttons.

Available Columns
        Lists all columns that the grid can display, divided into the following nodes that you can expand:


                 Bound Column Use to add individual data columns from those available in the data source selected on the
                  General tab. If Create columns automatically at run time is selected, all columns in this node are displayed. To
                  display only some columns, clear Create columns automatically at run time and add the data fields you want to
                  use.
                 Button Column Use to add columns that will contain buttons (command buttons or link buttons) that the user
                  can click to perform specific actions for an individual item. Open the Button Column node to add Select, Delete,
                  or Edit buttons to the grid. To add a custom button (such as a button that says "Add to Shopping Cart"), select the
                  Button Column node, click the Add button, and then format the custom button.
                 Hyperlink Column Use to add a column that will contain a link to another page. The hyperlink column can
                  contain static text or display a data column as a hyperlink.
                 Template Column Use to create a column that contains any combination of HTML text and controls. Template
                  columns allow you to include controls other than buttons (such as check boxes) in a DataGrid control.

Selected Column
        Displays a list of columns that you can customize. When you select a column in this list, the options below it in the dialog
        box change to reflect the settings you can customize for that column.

         If Create columns automatically at run time is selected, Selected Column displays a list of columns that will appear in
         addition to the columns generated automatically.

                                                                                                                        V. Matos – ASPNET - 11
Properties That Apply To All Column Types

Header Text
       The text displayed at the top of the column. The header value can be set to any HTML text (including tags). You can specify
       the font and color of the header on the Format tab. The text you specify for the header becomes the identifier for the
       column in the Selected Column list. Headers are displayed only if the Show Header option is selected on the General
       tab.

Footer Text
        The text displayed at the bottom of the column. By default, this is blank. The footer value can be set to any HTML text
        (including tags). You can specify the font and color of the header on the Format tab. Footers are displayed only if the
        Show Footer option is selected on the General tab.

Header Image
       The URL of an image file that is displayed at the top of the column. If you specify both header text and a header image, the
       header image takes precedence.

Sort Expression
        A string that is passed as a parameter when the SortCommand event is raised. Typically, you select the Allow Sorting
        option on the General tab, which causes the column headers to be rendered as LinkButton controls that raise the
        SortCommand event when clicked. For bound columns, the default sort expression is the name of the data field to which
          the column is bound. However, you can specify any string.
Visible
          Whether the column is visible by default when the page runs. Clearing this option allows you to define a column and specify
          its binding and formatting information, and then dynamically show and hide the column at run time.


Properties for Bound Columns

The options under BoundColumn Properties are displayed if the selection in Selected Column is a data field. For details about
creating bound columns, see Adding Bound Columns to a DataGrid Web Server Control.

Data Field.
        The name of the data field to which this column is bound. Read-only.
Data Formatting Expression
        A .NET framework formatting expression that is applied to the data before it is displayed in the column. The expression
        consists of optional static text and a format specifier that takes the following form:
        {0:format specifier}

          The zero is a parameter index indicating which data elements in the column to format; it is therefore usually zero to indicate
          the first (and only) element. The format specifier follows the colon (:) and consists of one or more letters indicating how to
          format the data. The format-specifier characters you can use depend on what type of data you are formatting — dates,
          numbers, or other types. The following table shows examples of formatting expressions for different types of data. For more
          information about formatting expressions, see Formatting Types.


             Format expression                   Applied to this data type                              Description
          Price: {0:C}                 numeric/decimal                               Displays the literal "Price:" followed by numbers
                                                                                     in currency format. The currency format depends
                                                                                     on the culture setting specified via the culture
                                                                                     attribute on the Page directive or in the
                                                                                     Web.config file.
          {0:D4}                       integer (Cannot be used with decimal          Integers are displayed in a zero-padded field four
                                       numbers.)                                     characters wide.
          {0:N2}%                      numeric                                       Displays the number with 2-decimal place
                                                                                     precision followed by the literal "%".
          {0:000.0}                    numeric/decimal                               Numbers rounded to one decimal place. Numbers
                                                                                     less than three digits are zero padded.
          {0:D}                        date/datetime                                 Long date format ("Thursday, August 06, 1996").
                                                                                     Date format depends on the culture setting of
                                                                                     the page or the Web.config file.
          {0:d}                        date/datetime                                 Short date format ("12/31/99").
          {0:yy-MM-dd}                 date/datetime                                 Date in numeric year-month-day format (96-08-
                                                                                     06).
                                                                                                                         V. Matos – ASPNET - 12
Read only
       Whether the data in this column will be displayed in an editable control when the item is put into edit mode. For details, see
       Allowing Users to Edit Items in a DataGrid Web Server Control.


Properties for Button Columns

The options under ButtonColumn Properties are displayed if the selection in Selected Column is a custom button column, a
Delete button column, or a Select button column. (A different set of options is displayed for an Edit button column.)

Text
         The text (caption) of the buttons if the buttons have the same text for every item in the grid. For example, set the Text
         property if you are defining a button that displays the word "Select" for each item in the grid. If the Text field property is
         set, it overrides this property.
Command name
         The string that is passed with the ItemCommand event when users click the button.
Text field
         The data source field to be used as the source of the button caption. If you set both this property and the Text property,
         the Text field takes precedence.
Button type
         What type of button to render — LinkButton or PushButton. The default is a LinkButton control.
Text format string
         A .NET Framework formatting expression that is applied to the button caption before the caption is displayed. This is useful
         if you are using the Text field property to set the button caption but the data is not in a suitable format for display


Properties for EditButton Columns

The options under EditButtonColumn Properties are displayed if the selection in Selected Column is an Edit button column.

Edit text.        The string to display on the face of the Edit button.
Cancel text.      The string to display on the face of the Cancel button.
Update text.      The string to display on the face of the Update button.
Button type.      What type of button to render — LinkButton or PushButton. The default is a LinkButton control.


Properties for HyperLink Columns

The options under HyperLinkColumn Properties are displayed if the selection in Selected Column is a Hyperlink button column.

Text             The text of the hyperlink if the links have the same text for every item in the grid.
URL              The URL of the page to go to. If URL Field is set, it overrides this property.
Text field       The data source field to be used as the source of the hyperlink text.
URL field        The field or property of the object in DataSource that will provide the URL of the page to go to. This property
                 overrides the URL setting.
Text format string
        A .NET framework formatting specifier that is applied to the hyperlink before it is displayed. This is useful if you are using
        the Text field property to set the hyperlink text but the data is not in a suitable format for display.
URL format string
        An expression that specifies how the URL will be formatted. The expression can include a .NET Framework formatting
        expression. For example, you might use a URL format such as the following:
        images/Title-{0}.gif

         This format might result in a URL such as:

         images/Title-1.gif
Target
         The window in which this column of buttons should be displayed. Enter the name of a window that will exist at run time or
         select from the pre-defined list of standard window identifiers.

Convert this column into a template column
       Recreate the select column to use a template, which is a combination of HTML text and controls. This allows you to specify
       the appearance of the column very precisely.


                                                                                                                          V. Matos – ASPNET - 13

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:11/16/2011
language:English
pages:13