|
i have date with my database with mm/dd/yyyy format and i need to write the same in out webpage as dd/mm/yyyy.
Can you please help me to convert this in to dd/mm/yyyy format thorugh asp coding.
thanks
|
|
|
|
|
Which date format do you need dd-MM-yyyy or dd/MM/yyyy
You wrote in subject that you need dd-MM-yyyy and in your question you want this format dd/MM/yyyy
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
The ideal solution is to fix your crappy database design. If you stored dates in a date format, you could read them into a datetime and then format them any way you wanted.
Otherwise, you may have to do some string mashing to get the result you want.
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.
|
|
|
|
|
Why you have to do this from asp code when you can do this from database if it comes from database
Use the below example.
just replace getdate() with your parameter
SELECT convert(varchar, getdate(), 103) – dd/mm/yyyy
SELECT convert(varchar, getdate(), 101) - mm/dd/yyyy
But the same thing you can do from you code this way.
DateTime todydate = new DateTime();
date.ToString("dd/mm/yyyy");
date.ToString("mm/dd/yyyy");
Believe Yourself™ ™
|
|
|
|
|
if (FileUpload1.HasFile == true)
{
FileUpload1.SaveAs(Server.MapPath("~/AdminSection/Attachment/"+FileUpload1.FileName.ToString()));
}
hi,
anybody knows, what may be the possibility by which this condition alwz return false.
|
|
|
|
|
In your case are you using AJAX? If yes then FileUpload1.HasFile return always false.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Priyagdpl wrote: what may be the possibility by which this condition alwz return false.
I am agree with Blue_Boy. I guess you are using FileUpload Control inside update panel.
Here is an workaround.
UpdatePanel-FileUpload Control[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
You cannot upload using AJAX. Rather if it is withing updatepanel use PostBackTrigger to do your job.
|
|
|
|
|
|
Hello all,
Recently i used Skin file feature of VS 2005 in my application.
It is similar to CSS files.
I want to know the difference bet'n these two and what are the ideal situations for using Skin file over CSS file and vice-versa.
Can anybody help me.
Thanks,
Nagendra.
|
|
|
|
|
as I understand that, skin and css realize the similar functions, but skin is generally used to set the commen propeties for controls, which may not be done by using CSS.
the two seem to be complementary to each other.
|
|
|
|
|
Skin applies to Server Side controls while CSS applies to client side html...
Actually skin changes to CSS when it renders to the client. ...
|
|
|
|
|
Thnx for ur help, i think i am clear now
|
|
|
|
|
Dear All,
I am having a web application, in a page I want to do achieve the below functionality:
In a grid list of options will be displayed, when the user selects and click on a button some process has to be done in back end in the same page but even though the user clicks on any grid paging or sorting any thing in the page the process triggered should not be stopped.
Can we achieve this? If so how it can be?
Kindly help me in this regard.
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I would suggest to develop the process as a windows application and run it from asp.net if it is a bigger one.
Because if you run the process from asp.net itself, then it will run within the context of IIS and also the the memory allocated to IIS is limited. This will broke the execution of the process if it is big. If the memory occupied by the process is exceed the IIS memory limit, then the session will be broken.
So if you create the process as a windows application, you can start the executable in the server side and pass some parameters as command line aruguments(if required) from asp.net. In this scenario, the process will not run under IIS context. But your asp.net application will need access rights to run the application. You can watch whether the process is completed asynchronously using client side timers.
|
|
|
|
|
|
What is this?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I am created a project in which i have added a BLL class in app_code.
In the begining the project was small but with time it is going big..now my question is ...i am putting all the functions (inculding insert,delete,update,edit)
is it ok to put all the code in one class???
One person's data is another person's program.
--J.Walia
|
|
|
|
|
Its always better to use atlest 3 tier Architecture in you appliction. Where you should have UI ( Presentation ) , BLL (Business Layer ) and DAL ( Data Adapter Layer).
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
can some one please tell me as to how we configure IIS settings so that we can send emails in our asp.net applications?? i've searched all over the net. Right now i stand confused! also i want to know as to how we configure smtp servers for the same.
|
|
|
|
|
paras.nitk wrote: can some one please tell me as to how we configure IIS settings so that we can send emails in our asp.net applications??
Setup SMTP Server in IIS[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
dude i already did that. still when i send email, it says port busy or something like it. totally clueless mann!
|
|
|
|
|
paras.nitk wrote: still when i send email, it says port busy or something like it.
How did you send your mail ? where is your source code ? What exact error are your getting ? Are your system is behind of any firewall ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi everybody
I am viji beginner to ASP.Net
I want to create class in asp.net for sql server tabels
please post the answer.
|
|
|
|
|
vijisuren wrote: I want to create class in asp.net for sql server tabels
What do you mean by create Class for SQL Server table ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|