jteixeira
Members-
Posts
86 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by jteixeira
-
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
-
error: Server Error in '/1' Application.--------------------------------------------------------------------------------A potentially dangerous Request.Form value was detected from the client (TextBox1="<html><HEAD><TITLE>U...").
-
it dosen't work error in "Page.RenderControl(htmlWriter);" -> RegisterForEventValidation can only be called during Render();
-
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
-
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
-
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?
-
thanks, one more thing i want send this request.url by email and i want to appears in hyperlink. Do you know?
-
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!
-
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(); }
-
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...
-
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
-
Hi, I'm working in visual web developer in C# and i want, when i click in a button send a mail.thank you
-
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.
-
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
-
I would like to know if exist some API of geocoding for C#