tag:blogger.com,1999:blog-6104185749662767834.post3488587372955713345..comments2023-07-25T11:38:09.791+05:30Comments on dotNETspidor: A dot net programming blog: Fill asp.net formview textbox to initial value in insert modeAnonymoushttp://www.blogger.com/profile/05731715262527259113noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-6104185749662767834.post-88001140935314390192012-04-16T15:35:12.158+05:302012-04-16T15:35:12.158+05:30I Cannot thank you enough, everything worked well!...I Cannot thank you enough, everything worked well! But I have a problem with the FormView. functionality.<br /><br />Here is the two Scenarios:<br /><br />1. When the Form loads (Page_Load()) at First, the default date works and inserts into the database as expected. But as soon I want to Insert another set of data into the database i.e Second time, the default date disappears until I reload the samsohttps://www.blogger.com/profile/00778702061039822407noreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-100248441543444302012-04-16T15:29:05.998+05:302012-04-16T15:29:05.998+05:30I Cannot thank you enough, everything worked well!...I Cannot thank you enough, everything worked well! But I have a problem with the FormView. functionality.<br /><br />Here is the Scenarios:<br /><br />1. When the Form loads (Page_Load()) at First, the default date works and inserts into the database as expected. But as soon I want to Insert another set of data into the database i.e Second time, the default date disappears until I reload the pagesamsohttps://www.blogger.com/profile/00778702061039822407noreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-54066197945097232242012-04-08T10:06:41.366+05:302012-04-08T10:06:41.366+05:30Dear Anonymous,
You can add 1 year in the current ...Dear Anonymous,<br />You can add 1 year in the current date time as: DateTime.Now.AddYears(1);<br />Similarly, to add 1 years to your mydate variable:<br />mydate.Now.AddYears(1);<br /><br />Thanks.Anonymoushttps://www.blogger.com/profile/05731715262527259113noreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-12204509070234695502012-04-08T00:24:46.227+05:302012-04-08T00:24:46.227+05:30Thank you very much! I am very happy because it wo...Thank you very much! I am very happy because it worked pretty cool for me. I have been struggling with this for a long while. Really appreciate it and keep up the good work!<br /><br />Please, if I can asked for more. I am trying to also Insert an expiry date where I will have to Add one (1) year to the initial date so as to get the expiry date from the initial date.<br /><br />If anyone can helpAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-61712814949781246482012-03-08T23:14:26.548+05:302012-03-08T23:14:26.548+05:30Thank you. I've been looking for exactly how t...Thank you. I've been looking for exactly how to set a textbox value in a formview for the last couple of hours.Bernie Greenehttp://www.imageconjurer.comnoreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-27628452631436081822012-02-07T23:14:43.750+05:302012-02-07T23:14:43.750+05:30thanks, I had tried filling up the form for two d...thanks, I had tried filling up the form for two daysAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-91919988380454106482009-07-27T21:24:01.795+05:302009-07-27T21:24:01.795+05:30This worked very well for me. I'm now looking...This worked very well for me. I'm now looking for a way to customize the way that the date is displayed. In my case, I'm using the date as part of an ID number for records in a database:<br />YYYY-MM-DD-#####<br /><br />How can I get the date to show up like this, so that the user just has to enter in the ##### at the end of the string?Powerhttps://www.blogger.com/profile/11019362743953644934noreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-15910591940263138172009-07-07T21:35:45.424+05:302009-07-07T21:35:45.424+05:30What if you don't want to reference a specific...What if you don't want to reference a specific control, but want to iterate through all controls in the EditTemplate?<br />I can iterate through FormView1.Controls[0].Controls[1].Controls[0].Controls, but is there a more direct way to get to the EditTemplate controls?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6104185749662767834.post-11146364113778554412009-06-21T12:33:13.287+05:302009-06-21T12:33:13.287+05:30Thanks worked well for me..Thanks worked well for me..Anonymousnoreply@blogger.com