.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 31st, 2009, 06:11 AM
sonel sonel is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 1 sonel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 11 m
Reputation Power: 0
My thesis (Online Billing and Reservation System)

Hello to everyone, i'm just new here in this forum

I have problems with the SQLdatabase, i just wanted to make the inputted data on alternate email textbox show on the same textbox after pressing the submit button and will also save on the database, but this always appear after i pressed the submit button

here is the image

http://img33.imageshack.us/img33/7879/problem1e.jpg

IMAGE PROBLEM 1
URL


I already used if IsDBNull but still not working.



http://img24.imageshack.us/img24/3496/help1oyh.jpg
The Whole Image Problem

URL



Code:
Imports System.Data.SqlClient
Imports System.Text.RegularExpressions
Partial Class html_Default
    Inherits System.Web.UI.Page
    Public con As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Thesis\App  _Data\JPDatabase.mdf;Integrated Security=True;User Instance=True")


    Function EmailAddressCheck(ByVal emailAddress As String) As Boolean
        Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"
        Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern)
        If emailAddressMatch.Success Then
            EmailAddressCheck = True
        Else
            EmailAddressCheck = False
        End If
    End Function

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        con.Open()
        Dim c As String
        c = "Select * from register where email = '" & Session("email") & "'"
        Dim com As New SqlCommand(c, con)
        Dim dr As SqlDataReader
        dr = com.ExecuteReader
        If dr.HasRows Then
            dr.Read()
            Label1.Text = dr("title")
            Label2.Text = dr("fname")
            Label3.Text = dr("surname")
            Label4.Text = dr("email")

            DropDownList1.SelectedItem.Text = dr("title")
            TextBox1.Text = dr("surname")
            TextBox2.Text = dr("fname")
            TextBox3.Text = dr("email")

            TextBox4.Text = dr("alemail")


        End If
        con.Close()
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        con.Open()
        Dim a As String
        a = "Update register set  mbirth = '" & DropDownList2.Text & "', dbirth = '" & TextBox12.Text & "', ybirth = '" & TextBox13.Text & "',gender = '" & DropDownList3.Text & "',alphone = '" & TextBox11.Text & "',phone = '" & TextBox10.Text & "',postal= '" & TextBox9.Text & "',state = '" & TextBox8.Text & "',country = '" & TextBox7.Text & "', city = '" & TextBox6.Text & "', mailadd = '" & TextBox5.Text & "', mailtype = '" & DropDownList6.Text & "',  title = '" & DropDownList1.Text & "' , alemail = '" & TextBox4.Text & "' where email = '" & Session("email") & "'"
        Dim com As New SqlCommand(a, con)
        com.ExecuteNonQuery()
        Response.Redirect("customerpersonal.aspx")
        con.Close()
    End Sub

End Class


if you did not understand what i said, please tell me, i will try to explain it much clearer.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > My thesis (Online Billing and Reservation System)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek