To be more specific here to your other post regarding incorrect data type. Essentially, I'm not sure the specific value of numericupdown1.Value (if it's integer or bool, or double) but you could save yourself a lot of issue if you changed your SELECT statement as such:
SqlCommand cmd = new SqlCommand("select * from student where student_no='" + numericupdown1.value.ToString() + "'",con)
However, if numericUpDown1.Value has datatype decimal then converting dt.Rows.Columns["Bookshelf"] to a string value and trying to pass it to a decimal container will fail.
My assumption will be that when it's pulled from the DB it's going to be presented as a decimal value anyway in which case you can drop the .ToString() from this part (keeping it in the SELECT statement) and if absolutely required can add a Convert.ToDecimal(dt.Rows.Columns["Bookshelf"]) to ensure it's registering as a decimal prior to trying to apply it to the numericUpDown1.Value variable.
Worst case scenario (ie: my brain hasn't tuned up yet for the day) use:
It's probably returning the value as INT, but your numericUpDown1.Value is reading as decimal. Thus you need to convert the returned value (which is INT) to decimal before putting it into numericUpDown1.Value.
However, when using the value as part of a SQL query, you're converting it to string because you're using a query "string" to select values.