Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [WebMethod]
- public String fechaHoy()
- {
- return DateTime.Now.ToString("d"); //"d" muestra solo la fecha, vacio muestra fecha y hora.
- }
- ////////////////aspx
- <div id="fecha" runat="server">
- ////////////////aspx.cs
- protected void Page_Load(object sender, EventArgs e)
- {
- WebService ws = new WebService();
- fecha.InnerHtml = ws.fechaHoy();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement