Notes on software and the ideas behind it
Find the meaning
behind the code.
I’m Fred Yang. I write about software—how it works, why it behaves the way it does, and the ideas that make code easier to reason about.
Open the notebookWorking notes / 2026
Recently mapped
Architecture, reactivity, and the hidden relationships that shape frontend systems.
asp.net
Parameterized Constructor of ObjectDataSource
Some time if the ObjectDataSource need a parameter instructor you can supply it in the ObjectCreating event.
Follow the thread
field note
Databinding life cycle
The page object is created (based on the .aspx file). The page life cycle begins, and the Page.Init and Page.Load events fire. All other control events fire. The data source controls perform any updates....
Follow the thread
asp.net
Custom Sorting Paging for GridView
ObjectDataSource can do sorting paging without writing code in the aspx.
The idea of using object data source is to move the code out of page.
Follow the thread
asp.net
Reading Binary Data Efficiently
protected void Page_Load(object sender, System.EventArgs e) { string connectionString = WebConfigurationManager.ConnectionStrings["Pubs"].ConnectionString; SqlConnection con = new SqlConnection(connectionString); string SQL = "SELECT logo FROM pub_info WHERE pub_id='1389'"; SqlCommand cmd = new SqlCommand(SQL, con); try { con.Open();...
Follow the thread
asp.net
GridView RowCommand event
In the RowDeleting, SelectedIndexChanging, RowUpdating, RowEditing, you can retrieve row index like e.RowIndex, or e.NewSelectedIndex, e.NewEditIndex. But GridVeiwCommandEventArgs has not index attribute. So how can you get the row index in RowCommand event? It...
Follow the thread