I am trying to do a date comparison is a SQL command. I am getting a date from a TextBox Calendar Extender, Converting the .text property to Type DateTime, and I keep getting the error: Conversion failed when converting datetime from character string. My SQL Table Column has Type datetime. This is how I am doing my dat etime conversion: Dim SDate As DateTime = Convert.ToDateTime(TextBox1.Text)
I have a question about lists. So let say i have a list with 2000 objects, object has a text and a timestamp. So i want to return the list and i wan to only show text which timestamp is > or < then datetime.now, that is example, yeah, so how should i do it better, faster? Ofc i can make another newList and then just circle tru the list and add to newly created list(newList) the items that i want to show, comparing the items timestamp, but it might take too much time and resources, is there an easier way? Cuz that list with 2000 objects can become bigger after some time.
I am using the VS 2008. I m using the TextboxwaterMarkExtender,Its working,Suppose watermark text is Type Name Here,Suppose i type sonia in textbox,When i refresh the page,then in textbox that is attached to Extender text is changing to Type Name Here,I want that if I type in textbox sonia,when the page is refreshed & page comes back,sonia is still there in textbox.
I trying to include a modal popup extender in my application that can be 'customized' at runtime, depending on what button it is being called from. Basically, I have 4 different buttons that I need to bring up a text box, allow the user to enter text in, and save to a database. Each text box needs to be associated with a different record, but the functionality of all of them would be the same.
Here is the code in the web page :
And here is the code behind : [Code]....
This is all in a content placeholder within a master page, i
I have TabContainer, every tab has asp:lable(inside header). I want that when I select a tab, the color of text(not tab background) would be change to white.I've already read this article but it does not help in my case. also found that .ajax__tab_active .ajax__tab_tab should be involved, but I can't find the property that can change the color.
I have an AJAX Calendar Extender inside an ASP.NET Repeater, which binds date data from a table and allows users to change this. I have an issue however - if the date is null, it returns an error as it cannot bind null as a selected date. Are there any ways around this?
i would like fetch data from db and bring it on to the text box using auto complete extender i have 2 column--- Emp_name and Emp_id in db. i want to see the name of employee when i type in the letters but when i select it from the selection of names, i would like emp_code to fill in the textbox
I am trying to change the color of the text in the title of a Calendar Extender Control from the AJAX Toolkit. I was having trouble getting the hover color to change, so I followed an example from this site:
I created a UserControl and added a public DateTime property. I want to set this property in Markup (ie. <cc1:MyControl runat="server" id="MyControl1" DateTimeProp="1/1/2010" /> ) however I live in a place with a dd/mm/yyyy date format so it complains if I set something like "20/1/2010". Is there a way to set markup in my local datetime format or do I have to conform to "mm/dd/yyyy"?
I am trying to store a SQL Server datetime into MySQL datetime field, but MySQL stores the date value as all zeros. I use this function to trim the fractional part from the SQL Server datetime, but get the same result when trying to store it in MySQL.
I'm trying to format the following string date1 = "16/06/2009"; string time1 = "5:30:00 PM"; DateTime dd = DateTime.ParseExact(date1 + " " + time1, "dd/MM/yyyy hh:mm:ss tt", null); It's throwing a invalid format exception when it tries to convert the string into datetime. Is the format wrong?
am developing an application using asp.net+ajax.i used calender extender control to select date and showing that date in a text box.my requirement is when select date from the previous year (i.e 2009) from the calender extender control...then a message should show like"you should not select the previous year date" and immediately current day date should fill in textbox.
i am displaying some news from rss feeds in the page. But i am stuck up in the date time conversion. I got th published datetime as pdt formated string. How can i convert to my local time. Coversion from the pdt string tot DateTime is error..
This second line is error and i need the result in the specified format or same format as in the published date but in local time ie IST (India Standard Time)
I am stuck with one issue in SSRS.I have one SP(sql server) that takes Datetime as input parameter. In my report i added one Report Parameter as Datetime and checked Allow Null values and when i run the report its throwing me an error telling that " TITLE: Microsoft Report Designer
An error occurred while executing the query. Failed to convert parameter value from a String to a DateTime. ADDITIONAL INFORMATION: Failed to convert parameter value from a String to a DateTime. (System.Data) String was not recognized as a valid DateTime. (mscorlib) "
ALTER PROCEDURE [dbo].[usp_Search_SSRSReport]( @Servicer_Loan_Number varchar(50), @Completed_Date datetime=NULL, @Doc_Review datetime=NULL ) AS BEGIN SET NOCOUNT ON; DECLARE @strSQL VARCHAR(5000) SET @strSQL = 'SELECT P.Servicer_Loan_Number,P.POOL_ID,P.OrderID,P.Borrower_First_Name+'' '' + P.Borrower_Last_Name AS BWRName, P.Mailing_Address+ CHAR(10) +P.Mailing_Address_City+'',''+P.Mailing_Address_State+'' ''+P.Mailing_Address_Zip AS Mailing_Address, P.Property_Address+ '','' +P.Property_Address_City+'',''+P.Property_Address_State+'' ''+P.Property_Address_Zip AS Property_Address, P.Servicer_Legal_Name,P.Offer_Expiration_Date,P.Document_Package_Complete, P.Counseling_Flag,P.Program_Flag,P.Active_Bankruptcy_Flag,P.Approved,P.Declined, D.Completed_Date,D.Recall_Status,D.Expired_Status,D.Doc_Review ' + ' FROM dbo.Processing(NOLOCK) P,dbo.Document_Exception(NOLOCK) D ' + ' WHERE P.Servicer_Loan_Number=D.LoanNumber ' if(@Servicer_Loan_Number is not null) and (@Servicer_Loan_Number != '') BEGIN SET @strSQL = @strSQL + ' AND P.Servicer_Loan_Number = ''' + @Servicer_Loan_Number + '''' End if(@Completed_Date is not null) and (@Completed_Date !='') BEGIN SET @strSQL = @strSQL + ' AND convert(varchar(11),D.Completed_Date,101) = ''' + convert(varchar(11),@Completed_Date,101)+ '''' End if(@Doc_Review is not null) and (@Doc_Review !='') BEGIN SET @strSQL = @strSQL + ' AND convert(varchar(11),D.Doc_Review,101) = ''' + convert(varchar(11),@Doc_Review,101)+ '''' End EXEC(@strSQL)
Is there a quick and easy way to convert a DateTime value retrieved from a SQL 2005 query to a C# DateTime datatype?
I can change my query to use sql's datepart function to return separate YYYY, MM and DD values and then use the right constructor to create a C# DateTime datatype but I'm just wondering if there's some C# method that will do the conversion for me.
I have a Visual Studio 2008 solution that when I build, returns the following error:
Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks
There is no reference file/line/column in the error. Becoming quite frustrating as the solution builds in the end, however I cannot debug.In the solution, there is no reference/using to DateTime.MinValue.Ticks at all...
There are only 2 references to ticks in my solution, and neither of those are causing the issue.There are no constructor issues with DateTime either. I do not believe it is related to DateTime or ticks at all.I have found a similar reference where it turned out to be a corrupt image file in the solution, where it did not have a date-modified value. This is not affecting mine though.
I have Html Editor control extender in my application. Iam trying to set property like Enabled="false" , but its allows to enter content in that control.Html Editor control extender Enable property not working. This is my control Html code.
<cc1: Editor ID="editor1" runat="server" Enabled="false" Width="400" Height="600"/> --- Now its allows to enter content.
When i try to set to Enabled="false" then, Font and Size dropdowns disabled, Remaining all areenabled.
<asp:TextBox ID="txtbox1" runat="server" Enabled="false" ></asp:TextBox> ---- Now its doesnot allow to enter text.
In my application am using Ajax Modal popup control Extender. Inside that Modal popup control i have Some controls like Textboxs, Dropdowns. These controls are working fine.
But the Problem was when i was try to attach a Calender control extender to a Text box. It does not displays the Calender in Mozilla. But this thing happend properly in IE.
Currently we are saving files (PDF, DOC) into the database as BLOB fields. I would like to be able to retrieve the raw text of the file to be able to manipulate it for hit-highlighting and other functions.Does anyone know of a simple way to either parse out the files and save the raw text on save, either via SQL or .net code. I have found that Adobe has a filtdump utility that will convert the PDF to text. Filtdump seems to be a command line tool, and i don't see a way to use a file stream. And what would the extractor be for Office documents and other file types?-or-Is there a way to pull out the raw text from the SQL Full text index, without using 3rd party filters?Note i am trying to build a .net & MSSql solution without having to use a third party tool such as Lucene