Date type
-
MrRhodos wrote:
How can I change the date type of a textbox
Plz Can You Explain In Brief..!
MyFirstArticle MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.
-
What do you mean ? A text box contains text. You can put a date in there, but only by rendering it as text. Your question makes no sense.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
What do you mean ? A text box contains text. You can put a date in there, but only by rendering it as text. Your question makes no sense.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
I know. At the moment the text box contains a date rendered as text, but it is a date field in SQL DB. At the moment the format is "date time" and I want to change it to only "date".
MrRhodos wrote:
and I want to change it to only "date".
CG Is Correct .! Please try To ask the Question In Brief..! It Is Nothing to do with TextBox .In PageLoad.You Have to change the value of Date From Db and convert it into Your Fomat and Display it in TextBox
MyFirstArticle MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.
-
MrRhodos wrote:
and I want to change it to only "date".
CG Is Correct .! Please try To ask the Question In Brief..! It Is Nothing to do with TextBox .In PageLoad.You Have to change the value of Date From Db and convert it into Your Fomat and Display it in TextBox
MyFirstArticle MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.
Now we are getting somewhere.. You understood my question. :-) I am a beginner, so you could please tell what kind of code I need and where I have to put it? I guees it is to be placed under scripts and look a bit like:
Protected Sub ProjektstartdatoTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
::code::
End Sub
Thanks for your help.
-
Now we are getting somewhere.. You understood my question. :-) I am a beginner, so you could please tell what kind of code I need and where I have to put it? I guees it is to be placed under scripts and look a bit like:
Protected Sub ProjektstartdatoTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
::code::
End Sub
Thanks for your help.
Use The Database query for retriving the data Fron DataBase as a date format
CONVERT (VARCHAR,u.[dob] ,101) AS dob
And Bind the Data to the Textbox in the FormView Like
<asp:TextBox ID="DateOfBirth" runat="server" Text='<%# Bind("dob") %>'></asp:TextBox>
and in pageload Bind the Source
MrRhodos wrote:
I am a beginner
Please try To Read a Good Book For FormView Control
MyFirstArticle MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.
-
Convert your date to proper format which is understood by sql server. use
DateTime.Parse
I think it would be better to understand your requirement if you could make more clear sentence. :rose:Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Use The Database query for retriving the data Fron DataBase as a date format
CONVERT (VARCHAR,u.[dob] ,101) AS dob
And Bind the Data to the Textbox in the FormView Like
<asp:TextBox ID="DateOfBirth" runat="server" Text='<%# Bind("dob") %>'></asp:TextBox>
and in pageload Bind the Source
MrRhodos wrote:
I am a beginner
Please try To Read a Good Book For FormView Control
MyFirstArticle MenuControlSelectedItem Why Do Some People Forget To Mark as Answer .If It Helps.
-
It was much easier than that, but thanks for your help. <%# Bind("dob","{0:d}") %> And you are right about the book, it would probably help a lot.
MrRhodos wrote:
And you are right about the book, it would probably help a lot.
But, you get to keep your job either way, so you're not going to bother learning ASP.NET, right ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.