Click here to Skip to main content
15,917,473 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: I have 1 very simple question Pin
Not Active29-Feb-08 12:20
mentorNot Active29-Feb-08 12:20 
GeneralRe: I have 1 very simple question Pin
Expert Coming29-Feb-08 12:50
Expert Coming29-Feb-08 12:50 
GeneralRe: I have 1 very simple question Pin
Not Active29-Feb-08 11:06
mentorNot Active29-Feb-08 11:06 
GeneralRe: I have 1 very simple question Pin
Jalle1-Mar-08 11:37
Jalle1-Mar-08 11:37 
GeneralRe: I have 1 very simple question Pin
Not Active1-Mar-08 13:40
mentorNot Active1-Mar-08 13:40 
GeneralRe: I have 1 very simple question Pin
Jalle1-Mar-08 21:56
Jalle1-Mar-08 21:56 
GeneralRe: I have 1 very simple question Pin
Not Active2-Mar-08 3:21
mentorNot Active2-Mar-08 3:21 
GeneralRe: I have 1 very simple question Pin
Jalle2-Mar-08 5:25
Jalle2-Mar-08 5:25 
Mark Nischalke wrote:
You have been given the answer, several times.

No I didnt get clear answer "several times" because probably no one here understands this matter, or maybe I was not clear enough.


Mark Nischalke wrote:
This project is clearly beyond your abilities if you can't see that. Leave it someone else, or give up.

No its not "beyond my abilities":

Imports System.Net.Mail<br />
Imports System.IO.Ports<br />
<br />
Public Class Service1<br />
<br />
    Public Names(25, 2) As String<br />
<br />
    Public Sub CheckBAH()<br />
        Dim strHTML As String = GetPageHTML("http://www.**********.aspx")<br />
        Dim pos As Integer = strHTML.IndexOf("")<br />
        strHTML = strHTML.Substring(pos, 200)<br />
        Dim Username As String = strHTML.Substring(3, strHTML.IndexOf("(") - 3).Trim<br />
        'Dim pin As String = strHTML.Substring(3, strHTML.IndexOf("(") - 3).Trim<br />
<br />
        Dim eur As Integer = strHTML.IndexOf("€")<br />
        Dim Prize As String = strHTML.Substring(eur - 10, 10)<br />
<br />
        Dim i As Integer<br />
        For i = 0 To 25<br />
            If Username.ToUpper = Names(i, 0).ToUpper Then<br />
                SendEmail(" Izvucen si ", Names(i, 0) & Names(i, 1) & Prize, "*************@yahoo.com")<br />
                'SendEmail(" Izvucen si ", Names(i, 0) & Names(i, 1) & Prize , "*************@yahoo.com")<br />
            End If<br />
        Next<br />
    End Sub<br />
<br />
    Public Function GetPageHTML(ByVal URL As String) As String<br />
        ' Retrieves the HTML from the specified URL<br />
        Dim objWC As New System.Net.WebClient()<br />
        Return New System.Text.UTF8Encoding().GetString(objWC.DownloadData(URL))<br />
    End Function<br />
<br />
    Public Function SendEmail(ByVal strSubject As String, ByVal strBody As String, ByVal strEmail As String) As String<br />
        Dim message As New MailMessage(strEmail, strEmail, strSubject, strBody)<br />
        Dim emailClient As New SmtpClient("out.mail.bih.net.ba")<br />
        Dim SMTPUserInfo As New System.Net.NetworkCredential("******", "******")<br />
        emailClient.UseDefaultCredentials = False<br />
        emailClient.Credentials = SMTPUserInfo<br />
<br />
        emailClient.Send(message)<br />
        Return 0<br />
    End Function<br />
<br />
    Private Sub InitializeComponent()<br />
        Me.components = New System.ComponentModel.Container<br />
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)<br />
        Me.SuspendLayout()<br />
        '<br />
        'Timer1<br />
        '<br />
        Me.Timer1.Interval = 1000<br />
        '<br />
        'Service1<br />
        '<br />
        Me.ClientSize = New System.Drawing.Size(292, 266)<br />
        Me.Name = "Service1"<br />
        Me.ResumeLayout(False)<br />
<br />
    End Sub<br />
<br />
<br />
    Public Sub ReadNames()<br />
        Names(0, 0) = "********"<br />
	.........<br />
        Names(25, 1) = "**********"<br />
    End Sub<br />
<br />
<br />
    Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick<br />
        <br />
        Debug.Print(Internet)<br />
        'CheckBAH()<br />
    End Sub<br />
    Private Function Internet() As Boolean<br />
        Dim siteResponds As Boolean = False<br />
        Try<br />
            siteResponds = My.Computer.Network.Ping("www.google.com")<br />
        Catch ex As Exception<br />
<br />
            Return siteResponds<br />
        End Try<br />
        Return siteResponds<br />
    End Function<br />
<br />
    Private Sub Service1_Load_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
        ReadNames()<br />
        Timer1.Start()<br />
        <br />
    End Sub<br />
End Class<br />

GeneralRe: I have 1 very simple question Pin
Not Active2-Mar-08 8:50
mentorNot Active2-Mar-08 8:50 
GeneralDeleting a row from a GridView without affecting the DataBase!!!! Pin
cosmoteco29-Feb-08 8:13
cosmoteco29-Feb-08 8:13 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! Pin
Not Active29-Feb-08 8:50
mentorNot Active29-Feb-08 8:50 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! Pin
cosmoteco29-Feb-08 10:07
cosmoteco29-Feb-08 10:07 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! Pin
Not Active29-Feb-08 11:08
mentorNot Active29-Feb-08 11:08 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! Pin
cosmoteco29-Feb-08 12:38
cosmoteco29-Feb-08 12:38 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! Pin
Not Active29-Feb-08 12:47
mentorNot Active29-Feb-08 12:47 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! [modified] Pin
cosmoteco29-Feb-08 13:02
cosmoteco29-Feb-08 13:02 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! Pin
Not Active29-Feb-08 13:40
mentorNot Active29-Feb-08 13:40 
GeneralRe: Deleting a row from a GridView without affecting the DataBase!!!! Pin
cosmoteco29-Feb-08 14:01
cosmoteco29-Feb-08 14:01 
QuestionRead certain cells of an Excel file Pin
Apples29-Feb-08 7:47
Apples29-Feb-08 7:47 
GeneralRe: Read certain cells of an Excel file Pin
Expert Coming29-Feb-08 11:04
Expert Coming29-Feb-08 11:04 
QuestionAdd my ASP.NET program to the Windows "Send To" option Pin
Apples29-Feb-08 7:39
Apples29-Feb-08 7:39 
GeneralRe: Add my ASP.NET program to the Windows "Send To" option Pin
Paul Conrad21-Mar-08 9:29
professionalPaul Conrad21-Mar-08 9:29 
GeneralHtml control value in codebehind..... Pin
i gr829-Feb-08 7:26
i gr829-Feb-08 7:26 
GeneralRe: Html control value in codebehind..... Pin
Parwej Ahamad29-Feb-08 7:35
professionalParwej Ahamad29-Feb-08 7:35 
GeneralAjax Control Toolkit Tools Reliability..... Pin
Deepak Nigam29-Feb-08 5:55
Deepak Nigam29-Feb-08 5:55 

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.