As others have pointed out, you have no way to store only the date part in date time field. You have to store only datetime or store the date in a string field. Doing the later would hinder you if you wish to do data manipulation based on the date value.
Now if you try to store only the date in a datetime column, the db by default would add 00 hrs as the default time value [correct me if I'm wrong].
Now you can easily remove the time part in the query using CONVERT(VARCHAR,[date column],101). But doing so would put extra load on your query and reduce its performance.
The best way to deal with it is to get the datetime value to the application and apply formatters to remove the time part from the datetime value. All that you need to do is to set the format string for the control that is going to display the value and you would be done.
hi....thanks for your reply
i've used all those functions to retrieve date from the field...but i just thought that if we would be able to save date only then how cool it would be.....anyways thanks for your reply
I creatd some dynamic textboxes in repeater control.. Had a button to add textboxes.. and link button to delete the rows from db..
im deleting the rows from repeater based on id in the table...upto this its working fine. But when i click on add button to add more rows and if i want to delete those rows, as they dont have any id in table how do i delete those rows..
Okay.Delete button is in the repater.right?then in the delete button click event you'll get the item index and using that item index delete that object from the viewstate and rebind repeater.is that makes sense?
Which values you are loosing?ItemIndex is enough to delete it from ViewState?Is this code working?whats the difficulty you are facing in the above code?
If you are saying about entered values in textboxes, then save that values to the persisting object before rebinding the repeater.
if anyone can help me with this or can tell me some other way to create such a user interactive seat chart...???
i'm using html input button for this purpose....but i'm unable to retrieve the values in .cs file....what i want is to display arrangement of around 100 seats in a theatre...and would like user to select some seats whose color will change on clicking without reloading the page.....and in .cs file i may be able to retrieve the seat numbers...???
same seat chart as you would find one while booking tickets for a movie online....they ask you select seats of your choice....i wanna do the same thing....can anyone help me???
i tried to use the update panel.....i took an update panel.....and 5 buttons....took a session variable and incremented it on click event of each button.....it all worked but the problem now is if i refresh the page the value of session variable is not refreshed....counting starts from the last where the page was refreshed....i'm providing you the code....Have a look....!!!
The default.aspx File:
<form id="form1" runat="server">
1. Displaying images does not depens upon IIS. If you dont have IIS then you can not host an .NET web application.
2. It seems that you can run the application and in runtime you can not see images. FYI, you mention images path in controls of your application and at runtime, the images path should match to the actual physical location images.
if you dont see images, rather you get to see 'image' control but a 'cross' showing images not displayed, right click on images to get to see what path the control is expecting at runtime. Depending upon that you should modify the image path in design view.
In each system it wil be prefixed with Local host number. the same code is working in other system. then what would be the problem? On ur suggestion i had right clicked on the image this was the link http://localhost:49216/ws/App_Data/pics/pic1.jpg in this except local host and its number my path is same