Click here to Skip to main content
16,016,613 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionSubmit button, onClick does not work automaticlly Pin
nour12326-Jan-07 3:12
nour12326-Jan-07 3:12 
AnswerRe: Submit button, onClick does not work automaticlly Pin
badgrs26-Jan-07 3:48
badgrs26-Jan-07 3:48 
GeneralRe: Submit button, onClick does not work automaticlly Pin
nour12326-Jan-07 5:11
nour12326-Jan-07 5:11 
GeneralRe: Submit button, onClick does not work automaticlly Pin
badgrs26-Jan-07 5:16
badgrs26-Jan-07 5:16 
GeneralRe: Submit button, onClick does not work automaticlly Pin
peshawarcoder26-Jan-07 7:15
peshawarcoder26-Jan-07 7:15 
GeneralRe: Submit button, onClick does not work automaticlly Pin
Guffa26-Jan-07 9:12
Guffa26-Jan-07 9:12 
GeneralRe: Submit button, onClick does not work automaticlly Pin
peshawarcoder26-Jan-07 7:18
peshawarcoder26-Jan-07 7:18 
GeneralRe: Submit button, onClick does not work automaticlly Pin
nour12326-Jan-07 9:55
nour12326-Jan-07 9:55 
Imports System.Data
Imports System.Data.OleDb
Partial Class Links
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Session("ID") = Nothing Then
Response.Redirect("default.aspx?flag=2")
End If

Dim conn As New OleDbConnection
Dim cm As New OleDb.OleDbCommand
Dim dr As OleDb.OleDbDataReader
HyperLink1.Enabled = False
HyperLink2.Enabled = False
HyperLink3.Enabled = False

Try
conn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Hosting;Data Source=JICC"
conn.Open()
cm.Connection = conn
cm.CommandText = "Select * From users where u_id=" & Session("id") & " "
dr = cm.ExecuteReader()

If dr.HasRows Then
Do While dr.Read
If dr.GetValue(7) = 1 Then
HyperLink1.Enabled = True
End If

If dr.GetValue(8) = 1 Then
HyperLink2.Enabled = True
End If

If dr.GetValue(9) = 1 Then
HyperLink3.Enabled = True
End If


Loop
dr.Close()
conn.Close()
Else
dr.Close()
conn.Close()
End If


Catch ex As Exception
Response.Write(Err.Description)
End Try

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn As New OleDbConnection
Dim cm As New OleDb.OleDbCommand
Dim dr As OleDb.OleDbDataReader

Try
conn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Hosting;Data Source=JICC"
conn.Open()
cm.Connection = conn
cm.CommandText = "Select * From types where t_name='" & TextBox1.Text & "' "
dr = cm.ExecuteReader()

If dr.HasRows Then
Do While dr.Read
Label1.Text = " نوع العقار موجود سابقاُ"
Label1.Visible = True

Loop

Else
Dim cm1 As New OleDb.OleDbCommand
cm1.Connection = conn
cm1.CommandText = "insert into types(T_Name) values('" & CStr(TextBox1.Text) & "') "
cm1.ExecuteNonQuery()
Label1.Text = "تمت الإضافة"
Label1.Visible = True

TextBox1.Text = ""

End If

dr.Close()
conn.Close()


Catch ex As Exception
Response.Write(Err.Description)
End Try

End Sub

End Class

GeneralRe: Submit button, onClick does not work automaticlly Pin
badgrs27-Jan-07 11:13
badgrs27-Jan-07 11:13 
Questionfile upload in asp.net 1.1 Pin
Pradip Kishore26-Jan-07 2:28
Pradip Kishore26-Jan-07 2:28 
AnswerRe: file upload in asp.net 1.1 Pin
NKandwal26-Jan-07 3:30
NKandwal26-Jan-07 3:30 
GeneralRe: file upload in asp.net 1.1 Pin
Pradip Kishore28-Jan-07 18:27
Pradip Kishore28-Jan-07 18:27 
GeneralRe: file upload in asp.net 1.1 Pin
Pradip Kishore28-Jan-07 18:37
Pradip Kishore28-Jan-07 18:37 
Questionre-setting text box in webforms Pin
Pradip Kishore26-Jan-07 1:48
Pradip Kishore26-Jan-07 1:48 
GeneralRe: re-setting text box in webforms Pin
badgrs26-Jan-07 3:50
badgrs26-Jan-07 3:50 
QuestionQUERY: Client-side DataGrid for faster fluid feel? Pin
dhruba.bandopadhyay26-Jan-07 0:27
dhruba.bandopadhyay26-Jan-07 0:27 
AnswerRe: QUERY: Client-side DataGrid for faster fluid feel? Pin
badgrs26-Jan-07 3:53
badgrs26-Jan-07 3:53 
QuestionWeb programming in tiers Pin
Member 374156225-Jan-07 21:09
Member 374156225-Jan-07 21:09 
AnswerRe: Web programming in tiers Pin
Colin Angus Mackay25-Jan-07 21:30
Colin Angus Mackay25-Jan-07 21:30 
AnswerRe: Web programming in tiers Pin
badgrs26-Jan-07 3:55
badgrs26-Jan-07 3:55 
QuestionSQLDATA Source -Multiple Resultset... Pin
Amit Kumar G25-Jan-07 14:56
Amit Kumar G25-Jan-07 14:56 
AnswerRe: SQLDATA Source -Multiple Resultset... Pin
Sylvester george26-Jan-07 3:41
Sylvester george26-Jan-07 3:41 
Questionis it good to use : SqlDataSource Pin
Amit Kumar G25-Jan-07 13:34
Amit Kumar G25-Jan-07 13:34 
AnswerRe: is it good to use : SqlDataSource Pin
goradaranaresh26-Jan-07 2:41
goradaranaresh26-Jan-07 2:41 
GeneralRe: is it good to use : SqlDataSource Pin
Amit Kumar G26-Jan-07 3:40
Amit Kumar G26-Jan-07 3:40 

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.