Jump to content

jteixeira

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by jteixeira

  1. jteixeira

    Update

    hi, I don't know if it is here but i hope that somebody help. I'm working in visual web developer in c# and i have a button, that when i click updates a row: protected void Button3_Click(object sender, EventArgs e) { ObjectDataSource4.Select(); } sql associated: [WebMethod] public bool anu(int nnumdoc, int cliente) { //Ligação ConnectionString = "data source=" + txtIP + ";uid=" + txtUser + ";password=" + txtPass + ";database=" + txtNomeBD; SqlConnection myconnection = new SqlConnection(ConnectionString); SqlCommand cmd = new SqlCommand(); cmd.Connection = myconnection; //Update qstring = " if(Select DOCGCCAB.DATA+2" + " FROM DOCGCCAB INNER JOIN CLIENTES ON CLIENTES.CODIGO=DOCGCCAB.TERCEIRO" + " WHERE TPDOC='ENC' AND DOCGCCAB.NNUMDOC=" + nnumdoc + " AND NUMERO=" + cliente + ")>CURRENT_TIMESTAMP" + " BEGIN" + " UPDATE DOCGCCAB" + " SET NVIAS=-1" + " WHERE TPDOC='ENC' AND DOCGCCAB.NNUMDOC=" + nnumdoc + " AND TERCEIRO=(SELECT TOP 1 TERCEIRO FROM DOCGCCAB INNER JOIN" + " CLIENTES ON CLIENTES.CODIGO=DOCGCCAB.TERCEIRO" + " WHERE NUMERO=" + cliente + ")" + " END" + " ELSE" + " Select 'Não pode anular esta encomenda, o prazo limite foi ultrapassado(48 horas)' 'Aviso'"; cmd.CommandText = qstring; try { cmd.Connection.Open(); cmd.ExecuteNonQuery(); cmd.Connection.Close(); } catch (System.Data.SqlClient.SqlException err) { return false; } return (true); } i want to know how i can print this page in my current web page.sorry in inglish
  2. error: Server Error in '/1' Application.--------------------------------------------------------------------------------A potentially dangerous Request.Form value was detected from the client (TextBox1="<html><HEAD><TITLE>U...").
  3. it dosen't work error in "Page.RenderControl(htmlWriter);" -> RegisterForEventValidation can only be called during Render();
  4. hi, i'm workin with visual web developer in c# and i have a page and i want that when i click in button, the page has mailed, not the link the page with the texboxes, label everything
  5. using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partial class Default2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { txtNumeric.Attributes.Add("onblur", "isNumeric(this)"); } protected void TextBox1_TextChanged(object sender, EventArgs e) { }} and <html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title><script type="text/javascript"> function isNumeric(box) { if(isNaN(box.value)) { alert("The value must be numeric!"); box.focus(); } }</script></head><body> <form id="form1" runat="server"> <div> <asp:TextBox id="txtNumeric" runat="server"/> </div> </form></body></html> There is no errors
  6. jteixeira

    Numeric Textbox

    hi, I have a textbox and i want that the textbox only accepts int values. I'm working with visual web developer 2005 in c# Anyone can help me?
  7. jteixeira

    Page Address

    thanks, one more thing i want send this request.url by email and i want to appears in hyperlink. Do you know?
  8. jteixeira

    Page Address

    Hi, I'm working in visual web developer in c#, and i would like to know, how i do when i click in the button return the adress page!
  9. I search and find, for all who want know this: using System.Net.Mail;protected void Button1_Click(object sender, EventArgs e) { MailMessage msg = new MailMessage(); msg.From = new MailAddress("xxxxx@xxxxx.com, "name"); msg.To.Add(new MailAddress("xxxxx@xxxxx.com", "name")); msg.Subject = "text"; msg.Body = GetGridHtml(); msg.IsBodyHtml = true; msg.Priority = MailPriority.High; SmtpClient c = new SmtpClient("mx.ptmail.sapo.pt"); c.Send(msg); Response.Write("send sucessful!"); } private string GetGridHtml() { GridView gv = new GridView(); gv.DataSource = ObjectDataSource1.Select(); gv.DataBind(); StringWriter writer = new StringWriter(); HtmlTextWriter htmlWriter = new HtmlTextWriter(writer); gv.RenderControl(htmlWriter); return writer.ToString(); }
  10. jteixeira

    print

    What i pretend is: i have a web page of invoices and i want when i click in button "send by email", mail all the page for one person automatically.Sorry my English
  11. jteixeira

    print

    where i put the email adress?
  12. jteixeira

    print

    one more question, do you know any way to send current webpage for mail?
  13. jteixeira

    print

    hi, I'm using visual web developer in c# and I would like to implement a button which will, upon click, print the currentwebpage.I have no idea where to begin, I think I need some sort of client scriptingbut I suppose there's a simple solution for this...
  14. Hi , I'am trying to send a gridview data by email, but i don't no why to do. I'am using visual web developer in c# Someone can help me? It is very important
  15. jteixeira

    Sending a email

    Hi, I'm working in visual web developer in C# and i want, when i click in a button send a mail.thank you
  16. jteixeira

    Gridview

    hi, I am devoloping, a web page and I have in a form a gridview with data, and I want to know how I do to sent by email the gridview data when i click in the button. I am workin in visual web developer in C#. I have this: protected void Button3_Click(object sender, EventArgs e) { MailMessage msg = new MailMessage(); msg.From = new MailAddress("xxxx@xxxx.com", "Gestor"); msg.To.Add(new MailAddress("xxxx@xxxx.com","Cliente")); msg.Subject = TextBox1.Text; msg.Body = GetGridHtml(); msg.IsBodyHtml = true; msg.Priority = MailPriority.High; SmtpClient c = new SmtpClient("hotmail.com"); c.Send(msg); } private string GetGridHtml() { GridView1.DataSource = ObjectDataSource1.Select(); ObjectDataSource1.DataBind(); StringWriter writer = new StringWriter(); HtmlTextWriter htmlWriter = new HtmlTextWriter(writer); GridView1.RenderControl(htmlWriter); return writer.ToString(); } Anyone can help me?sorry my inglish.
  17. jteixeira

    Date

    i only want the date for example ''16-02-2007"
  18. jteixeira

    Date

    hi,i would like to know, how i select only the date of now?
  19. Hi,I have 2 tables:Table 1 i have: PRUNIT, IVA,QUANT, TPDOCUM, NNUMDOC, NUMLINHA, ARTIGOTable 2 i have: TPDOC,NNUMDOC,DATA,SERIE,TERCEIRO,RGIVA,MOEDA,TOTDOCMBI want to insert in the table 2 TOTDOCMB=(PRUNIT + (PRUNIT * (IVA/100)))*QUANTI do this: Create PROCEDURE Preço @p int asset @p=(select (PRUNIT + (PRUNIT * (IVA/100)))*QUANT as PreçoFinal FROM DOCGCLIN WHERE TPDOCUM LIKE 'ENC' AND NNUMDOC=4 AND NUMLINHA=1 AND ARTIGO='AC011')INSERT INTO DOCGCCAB (TPDOC,NNUMDOC,DATA,SERIE,TERCEIRO,RGIVA,MOEDA,TOTDOCMB)VALUES('ENC',4,CURRENT_TIMESTAMP,1,528,'POR','EUR',@p)Return PreçoBut it doesn't work
  20. I would like to know if exist some API of geocoding for C#
×
×
  • Create New...