Added: 2 years ago
From: CSharpGuitar
Views: 3,819
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (2)

Sign In or Sign Up now to post a comment!
  • Second - When to use "percent pound" vs. "percent equals" Here "percent pound" is the same as "percent hash" or "percent sharp":

    • The <%= (equal) expressions are evaluated at render time.

    • The <%# (pound) expressions are evaluated at DataBind() time and are not evaluated at all if DataBind() is not called.

    • <%# (pound) expressions can be used as properties in server-side controls. <%= (equal) expressions cannot.

  • Great Lesson! I would add that some "understanding" could be leveraged around what is being done in setting viewstate to false in the GridView and why the "percent pound" is used in the codeblock vs. percent equals.

    First - GridViews save the grid in the viewstate. They also use the viewstate to auto-generate comumns. Setting EnableViewState and AutoGenerateColumns to "false" lets you control the column data manually via the Columns tags. This allows manual control.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more