Click here to Skip to main content
15,887,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: User control issues Pin
Hiren solanki14-Dec-10 20:07
Hiren solanki14-Dec-10 20:07 
AnswerRe: User control issues Pin
Hiren solanki14-Dec-10 21:57
Hiren solanki14-Dec-10 21:57 
GeneralRe: User control issues Pin
Swiftain15-Dec-10 6:29
Swiftain15-Dec-10 6:29 
GeneralRe: User control issues Pin
Hiren solanki15-Dec-10 18:33
Hiren solanki15-Dec-10 18:33 
QuestionTaking Screen Shots in client browsers Pin
Hema Bairavan14-Dec-10 18:15
Hema Bairavan14-Dec-10 18:15 
AnswerRe: Taking Screen Shots in client browsers Pin
Hiren solanki14-Dec-10 18:55
Hiren solanki14-Dec-10 18:55 
AnswerRe: Taking Screen Shots in client browsers Pin
RaviRanjanKr15-Dec-10 3:19
professionalRaviRanjanKr15-Dec-10 3:19 
QuestionProblem While Sending SMS Pin
Ravikant Y. Ninave14-Dec-10 13:54
Ravikant Y. Ninave14-Dec-10 13:54 
Hi All,
I've to send SMS from My web Application (I'm using ASP.NET VB). My SMS API is on .php site. Here is a Sample.

Dim MyString, CellNo As String
MyString = "Message"
CellNo = "Cell No"

Dim Http As HttpWebRequest = WebRequest.Create("http://208.101.14.59/api/pushsms.php?usr=USERID&pwd=PASSHERE&sndr=SENDERID&ph=" & CellNo & "&text=" & MyString & "&rpt=1")
Dim resp As HttpWebResponse = req.GetResponse()

OR USING THIS METHOD

Dim Http As HttpWebRequest = WebRequest.Create("http://208.101.14.59/api/pushsms.php?usr=USERID&pwd=PASSHERE&sndr=SENDERID&ph=" & CellNo & "&text=" & MyString & "&rpt=1")
Http.Method = "GET"
Using WebResponse As HttpWebResponse = Http.GetResponse()
Dim responseStream As Stream = WebResponse.GetResponseStream()
Dim reader As StreamReader = New StreamReader(responseStream, Encoding.Default)
Dim html As String = reader.ReadToEnd()
responseStream.Close()
End Using

When I use this I Get Error Like:
An attempt was made to access a socket in a way forbidden by its access permissions 208.101.14.59:80

I google it and got many solutions which were not usefull finally I contacted my Server Administrator and they told me that they doesn't supports Browsing Feature to other sites from their server. So I use following code :

Session("CellNo")="CellNo"
Session("SMSMess") ="Messagetext"

Dim newWin As String = ("<script language='javascript'>" + "window.open('msgstat.aspx' , 'Print', 'height=200, width=220, menubar=no, toolbar=no, scrollbars=no, resizable=no'); </script>")
ClientScript.RegisterStartupScript(Me.GetType(), "pop", newWin)

I openes Popup Window. My Code on Popup Window:

Design:
<script language="javascript" type="text/javascript">
function CloseMe() {
window.close()
}
</script>


<body style="background:#2C6494;" topmargin="15px" leftmargin="0" onload="CloseMe()">
<form id="form1" runat="server" style="background:#2C6494;">
<div style="background:#2C6494">
<iframe runat ="server" id ="ravi" frameborder="0" height="1px" width="1px" />
<br /><br /><br /><br />
<div align="center">
<b>Updating details...Please wait..</b>
</div>
</div>
</form>
</body>


CodeBehind:
Try
Dim myString As String = "http://208.101.14.59/api/pushsms.php?usr=USERID&pwd=PASSHERE&sndr=SENDERID&ph=" & Trim(Session("CellNo")) & "&text=" & Trim(Session("SMSMess")) & "&rpt=1"

ravi.Attributes.Add("src", myString)
Catch ex As Exception
Response.Write("Error Occured")
End Try

It works Fine. When I Click on Send Button Popup opens and SMS sends successfully. Ok with 1 SMS But What about Bulk Messages How could I Use it. Can anyone helps me?

Thanx
AnswerRe: Problem While Sending SMS Pin
RaviRanjanKr15-Dec-10 3:20
professionalRaviRanjanKr15-Dec-10 3:20 
Questionhtml cleanup Pin
Dhyanga14-Dec-10 7:41
Dhyanga14-Dec-10 7:41 
AnswerRe: html cleanup Pin
Not Active14-Dec-10 9:02
mentorNot Active14-Dec-10 9:02 
GeneralRe: html cleanup Pin
Dhyanga14-Dec-10 9:10
Dhyanga14-Dec-10 9:10 
GeneralRe: html cleanup Pin
Not Active14-Dec-10 9:20
mentorNot Active14-Dec-10 9:20 
GeneralRe: html cleanup (edited) Pin
NeverHeardOfMe14-Dec-10 9:13
NeverHeardOfMe14-Dec-10 9:13 
GeneralRe: html cleanup (edited) Pin
Not Active14-Dec-10 9:18
mentorNot Active14-Dec-10 9:18 
AnswerRe: html cleanup [modified] Pin
Hiren solanki14-Dec-10 20:02
Hiren solanki14-Dec-10 20:02 
GeneralRe: html cleanup [modified] Pin
Dhyanga15-Dec-10 3:06
Dhyanga15-Dec-10 3:06 
QuestionAsp.net gauge control Pin
venu65614-Dec-10 1:56
venu65614-Dec-10 1:56 
QuestionLoading CKEditor drop-down plugin from database? Pin
Gregory Gadow13-Dec-10 7:39
Gregory Gadow13-Dec-10 7:39 
AnswerSolution Pin
Gregory Gadow16-Dec-10 9:42
Gregory Gadow16-Dec-10 9:42 
QuestionOk Cancel button using javascript [modified] Pin
padmanabhan N12-Dec-10 23:19
padmanabhan N12-Dec-10 23:19 
AnswerRe: Ok Cancel button using javascript Pin
Sandeep Mewara12-Dec-10 23:28
mveSandeep Mewara12-Dec-10 23:28 
AnswerRe: Ok Cancel button using javascript Pin
NeverHeardOfMe12-Dec-10 23:29
NeverHeardOfMe12-Dec-10 23:29 
GeneralRe: Ok Cancel button using javascript Pin
padmanabhan N12-Dec-10 23:51
padmanabhan N12-Dec-10 23:51 
GeneralRe: Ok Cancel button using javascript Pin
NeverHeardOfMe13-Dec-10 0:12
NeverHeardOfMe13-Dec-10 0:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.