Jump to content

jteixeira

Members
  • Posts

    86
  • Joined

  • Last visited

jteixeira's Achievements

Newbie

Newbie (1/7)

0

Reputation

  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
×
×
  • Create New...