Sunday 26 May 2013

Send Sms from ASP.NET Website using Full On Sms

ASPX CODE
-----------------------------------------------------------------------------------------------------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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>Send Sms</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="Label1" runat="server" Text="Mobile No"></asp:Label>    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="Label2" runat="server" Text="Message"></asp:Label>
        &nbsp;&nbsp;
        <asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine"></asp:TextBox>
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" Text="Send Sms"
            onclick="Button1_Click" />
          
    </div>
    </form>
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CS CODE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net;

public partial class _Default : System.Web.UI.Page
{

string uid;
string password;
string message;
string no;

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public void send()
    {
    HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=fullonsms");
    HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
    System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
    string responseString = respStreamReader.ReadToEnd();
    respStreamReader.Close();
    myResp.Close();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            uid = "";
            password = "";
            message = TextBox2.Text;
            no = TextBox1.Text;
            send();
            TextBox2.Text ="";
            TextBox1.Text="";
        }
        catch(Exception ex )
        {
            ex.Message.ToString();
        }
    }
}

Please Download

http://www.c-sharpcorner.com/UploadFile/ANURAGSARKAR19/send-sms-from-Asp-Net-using-way2sms

CSS3 SHAPES

You can use these shapes in any html control like text area , buttons , grids etc.

SQUARE

#square {
width: 140px; 
height: 140px; 
background: blue; 
}
CIRCLE

#circle { 
width: 140px;
height: 140px;
background: blue; 
-moz-border-radius: 70px; 
-webkit-border-radius: 70px; 
border-radius: 70px;
}

OVAL
#oval {
width: 200px; 
height: 100px; 
-moz-border-radius: 100px / 50px; 
-webkit-border-radius: 100px / 50px; 
border-radius: 100px / 50px;
}

you can use the oval shape in text area .

ROUNDED CORNER
#rc 
{
border:display:solid;
border-radius: 5px;
   border-width:1px;
 }

you can use this in text area .

SPEECH BLUE
#speech-bubble {
width: 120px; 
height: 80px; 
background: blue;
position: absolute;
-moz-border-radius: 10px; 
-webkit-border-radius: 10px; 
border-radius: 10px;
}
#speech-bubble:before {
content:"";
position: absolute;
width: 0;
height: 0;
border-top: 13px solid transparent;
border-right: 26px solid blue;
border-bottom: 13px solid transparent;
margin: 13px 0 0 -25px;
}

you can use speech blue to show messages if text boxes are left blank

Thursday 2 May 2013

Logical vs. Physical Separation Software Development

Logical Separation refers to: 
Code organization Namespaces, classes, folders, and assembliesSoftware design pattern  
 
Physical Separation refers to:  
Infrastructure organization  Separate physical processes, machines, devicesSoftware architecture

By- Vidya Vrat Agarwal.