Arkangel Posted October 31, 2007 at 05:16 PM Report Share #144291 Posted October 31, 2007 at 05:16 PM Boas pessoal. Estou a aprender a programar em c# e precisava de uma pequena ajuda. Estou a desenvolver uma aplicação web e gostaria de colocar numa textbox (ou calendário ou o que for melhor) a data actual, mas que não fosse possível alterá-la. Por exemplo, hoje é 31-10-2007, queria que surgisse essa data e que não pudessem alterar. Existe alguma forma de fazer isto? Obrigado. P.S.:Até há algum tempo atrás desconhecia a existência desta comunidade. Os meus parabéns pelo projecto e espero vir igualmente a contribuir para ele. Nem que seja com dúvidas eheh. Link to comment Share on other sites More sharing options...
Betovsky Posted October 31, 2007 at 05:38 PM Report Share #144292 Posted October 31, 2007 at 05:38 PM A textbox tem uma propriedade que é ReadOnly basta pores a True que já se torna impossivel o utilizador mudar o seu valor. "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk Link to comment Share on other sites More sharing options...
Arkangel Posted October 31, 2007 at 05:46 PM Author Report Share #144294 Posted October 31, 2007 at 05:46 PM Thanx. Mas precisava de saber como faço para aparecer sempre a data actual. Link to comment Share on other sites More sharing options...
Betovsky Posted October 31, 2007 at 05:47 PM Report Share #144295 Posted October 31, 2007 at 05:47 PM textBox1.text = DateTime.Today.toString(); "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk Link to comment Share on other sites More sharing options...
Arkangel Posted October 31, 2007 at 06:03 PM Author Report Share #144300 Posted October 31, 2007 at 06:03 PM Thanx. 😁 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now