|
|
|
290 days, 1 hour, 1 minute
ago
Friday, May 29, 2009 11:23:17 PM
GMT
Wednesday, May 27, 2009 12:56:30 PM
GMT
|
|
dotnetspidor.blogspot.com --
In most scenarios, the asp.net data controls like detailsview and formview have empty controls in insert mode. This means any field that requires [or at least expects] user input will not contain any data. But this default configuration sometimes needs to be modified. Say, we would like to fill the date field in a textbox to current date, so that it will be easier for user. This is just an example. This can be the asp.net dropdownlist from where we would like to select one value initially, or it may be other asp.net user input control like checkbox or radiobutton. In such scenario, we can set the control value to some default initial value. With datacontrols like formview and detailsview, it takes a little effort [simple and tricky!]. In this short post [In fact I am expecting to keep this post as such as possible since there is no need of much explanation: concept is crystal clear and implementation is also easy!] I am going to show the simple coding practice to initiate the formview or detailsview control to some value. I will be choosing formview to show the example.
|
|
tags:
asp.net, formview
|
|
No comments yet, be the first one to post comment.