Jump to content

kfc

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by kfc

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="sms.aspx.cs" Inherits="sms" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title></head><body>    <form id="form1" runat="server">  <div style="font-family: 'Times New Roman', Times, serif; font-size: medium; color: #FF3300; background-color: #0033CC"><div style="border: thick inset #FFFFFF; text-transform: capitalize; font-family: Arial; font-weight: bolder; font-size: large; color: #800000; background-color: #99CCFF; text-decoration: underline blink; text-align: center;">Sending of sms to mobile through asp.net<br/>		    </div> <br/>		    <br/>  <asp:panel id="Panel1" runat="server" width="475px">       <table>    <tbody><tr>   <td>    Mobile No. :   </td>   <td>    <asp:textbox id="TextBox1" runat="server"></asp:textbox><asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="TextBox1" errormessage="Enter The Value" forecolor="#FF3300"></asp:requiredfieldvalidator>   </td> </tr><tr>    <td>	 Mobile Password :   </td>   <td>  <asp:textbox id="TextBox2" runat="server" textmode="Password"></asp:textbox><asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" controltovalidate="TextBox2" errormessage="Enter The Value" forecolor="#FF3300"></asp:requiredfieldvalidator>   </td> </tr><tr> <td>		    To Mobile No :   </td>   <td>  <asp:textbox id="TextBox3" runat="server"></asp:textbox><asp:requiredfieldvalidator id="RequiredFieldValidator3" runat="server" controltovalidate="TextBox3" errormessage="Enter The Value" forecolor="#FF3300"></asp:requiredfieldvalidator>   </td></tr><tr>  <td>	 Message :   </td>   <td> <asp:textbox id="TextBox4" runat="server" height="75px" textmode="MultiLine"></asp:textbox>	   <asp:requiredfieldvalidator id="RequiredFieldValidator4" runat="server" controltovalidate="TextBox4" errormessage="Enter The Value" forecolor="#FF3300"></asp:requiredfieldvalidator>   </td> </tr>       </tbody></table>    </asp:panel>    <iframe runat="server" style="visibility:hidden;" id="sms1"></iframe>	                                                           ÂÂ	    <asp:button id="Button1" runat="server" onclick="Button1_Click" text="Send Sms">		    </asp:button></div>    </form></body></html>using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class sms : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {    }    protected void Button1_Click(object sender, EventArgs e)    {	    try	    {		    sms1.Attributes.Add("Src", "http://site5.way2sms.com/jsp/regcon.jsp?random=C250DEB289834CA172F7EFAC73503FC7.w8131364157894809" + TextBox1.Text + "&pwd=" + TextBox2.Text + "&msg=" + TextBox4.Text + "&phone=" + TextBox3.Text + "&provider=way2sms");		    Response.Write("mail sucessfully sent to '" + TextBox3.Text + "'!!!  kindly check ur phone ");		    Panel1.Visible = false;		    Button1.Visible = false;	    }	    catch (Exception ex) { Response.Write(ex.Message); }    }}

    i found this code on google. this is not working. kindly tell me where is the problem. kindly see code.

  2. <%@ Import Namespace="System.Web.Mail" %><script language="c#" runat="server">private void btnSend_Click(object sender, System.EventArgs e){    MailMessage msg = new MailMessage();    msg.To = txtTo.Text;    msg.From = txtFrom.Text;    msg.Subject = txtSubject.Text;    msg.Body = txtContent.Value;    lblStatus.Text = "Sending...";											    SmtpMail.Send(msg);    lblStatus.Text = "Sent email (" + txtSubject.Text + ") to " +txtTo.Text;}</script><html><body>    <h3>	    Email From ASP.NET</h3>    <form id="MailForm" method="post" runat="server">	    <asp:Label ID="Label1" Style="left: 100px; position: absolute; top: 100px" runat="server">From:	    </asp:Label>	    <asp:TextBox ID="txtFrom" Style="left: 200px; position: absolute; top: 100px"		  runat="server"></asp:TextBox>	    <asp:RequiredFieldValidator ID="FromValidator1" Style="left: 100px; position: absolute;		    top: 375px" runat="server" ErrorMessage="Please Enter the Email From." Width="200px"		    Height="23px" ControlToValidate="txtFrom"></asp:RequiredFieldValidator>	    <asp:RegularExpressionValidator ID="FromValidator2" Style="left: 100px; position: absolute;		    top: 400px" runat="server" ErrorMessage="Please Enter a Valid From Email address"		    ControlToValidate="txtFrom" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)		    *"></asp:RegularExpressionValidator>	    <asp:Label ID="Label2" Style="left: 100px; position: absolute; top: 125px" runat="server">To:	    </asp:Label>	    <asp:TextBox ID="txtTo" Style="left: 200px; position: absolute; top: 125px"		  runat="server"></asp:TextBox>	    <asp:RequiredFieldValidator ID="ToValidator1" Style="left: 100px; position: absolute;		    top: 425px" runat="server" ErrorMessage="Please Enter the Email To." Width="200px"		    Height="23px" ControlToValidate="txtTo"></asp:RequiredFieldValidator>	    <asp:RegularExpressionValidator ID="ToValidator2" Style="left: 100px; position: absolute;		    top: 450px" runat="server" ErrorMessage="Please Enter a Valid To Email address"		    ControlToValidate="txtTo" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)		    *"></asp:RegularExpressionValidator>	    <asp:Label ID="Label3" Style="left: 100px; position: absolute; top: 150px"		  runat="server">Subject</asp:Label>	    <asp:TextBox ID="txtSubject" Style="left: 200px; position: absolute; top: 150px"		    runat="server"></asp:TextBox>	    <asp:Label ID="Label4" Style="left: 100px; position: absolute; top: 175px" runat="server">Mail:	    </asp:Label>	    <textarea runat="server" id="txtContent" style="left: 200px; width: 400px; position: absolute;		    top: 175px; height: 125px" rows="7" cols="24">			    </textarea>	    <asp:Button ID="btnSend" Style="left: 200px; position: absolute; top: 350px" runat="server"		    Text="Send" OnClick="btnSend_Click"></asp:Button>	    <asp:Label ID="lblStatus" Style="left: 250px; position: absolute; top: 350px" runat="server">	    </asp:Label>    </form></body></html>

  3. I have 1 text box name: createcontrolbox:........................................... quantity:........................................................ one button .........create.....................i have to enter suppose: text ........ 5 thenclick buttonit should show me 5 text box.......should be created. i dont ve to use javascript. only

    [/size]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>    <title></title></head><body><table><tr><td><label for="ctrlname"> Createcontrol*</label></td><td><input  type="text" id ="Text1" name="Createcontrol" maxlength="50" size="30"/></td></tr><tr><td><label for="quantity"> quantity*</label></td><td><input  type="text" id ="Text2" name="quantity" maxlength="50" size="30"/></td></tr><tr><td><input  type="button" id ="btncr" value= "create" /></td></tr></table></body></html>

  4. [/color][/color][/color][color=#333333]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head></head><body><table><tr><td><label for="ctrlname"> name*</label></td><td><input  type="text" id ="Text1" name="Createcontrol" maxlength="50" size="30"/></td></tr><tr><td><label for="quantity"> cell*</label></td><td><input  type="text" id ="Text2" name="quantity" maxlength="50" size="30"/></td></tr><tr><td><label for="ctrlname"> Createcontrol*</label></td><td>>net:<input  type="checkbox" id ="checkbox1" name=".net"  size="30"/>	java:<input  type="checkbox" id ="checkbox2" name="java"  size="30"/>	anroid:<input  type="checkbox" id ="checkbox3" name="anroid"  size="30"/>	iphone:<input  type="checkbox" id ="checkbox4" name="iphone"  size="30"/>	perl:<input  type="checkbox" id ="checkbox5" name="perl"  size="30"/>	</td></tr><tr><td><input  type="button" id ="btncr" value= "create" onclick="create()"/></td></tr></table></body></html>[/color][color=#333333]

    suppose i selected 1st,(checkbox),2nd , 3rd. then 4th (then 1st will be disabled or removed).how to do it. plz help.

×
×
  • Create New...