Click here to Skip to main content
15,895,746 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: ASP Logout Pin
Arun Jacob20-Sep-11 1:46
Arun Jacob20-Sep-11 1:46 
GeneralRe: ASP Logout [modified] Pin
berba20-Sep-11 1:48
berba20-Sep-11 1:48 
Questionredirect page in asp.net Pin
ZeroOne819-Sep-11 15:40
ZeroOne819-Sep-11 15:40 
AnswerRe: redirect page in asp.net Pin
Parwej Ahamad19-Sep-11 18:41
professionalParwej Ahamad19-Sep-11 18:41 
AnswerRe: redirect page in asp.net Pin
AditSheth19-Sep-11 22:29
AditSheth19-Sep-11 22:29 
AnswerRe: redirect page in asp.net Pin
GenJerDan20-Sep-11 5:14
GenJerDan20-Sep-11 5:14 
GeneralRe: redirect page in asp.net Pin
ZeroOne820-Sep-11 9:20
ZeroOne820-Sep-11 9:20 
AnswerRe: redirect page in asp.net Pin
Shah Rizal22-Sep-11 19:02
Shah Rizal22-Sep-11 19:02 
Try this but the code is in vb,get the idea and convert to C#(if you use C#)

VB
Private Function CheckID(ByVal strID As String)
 Dim strSQL As String
 Dim conn As New OracleConnection
 Dim reader As System.Data.OracleClient.OracleDataReader

 strSQL = "Select ID From <Your table's name> Where ID = '" & strID & "'"
 Dim cmd = New OracleCommand(strSQL , conn)
 reader = cmd.ExecuteReader()
 If reader.Read() Then
    If reader.HasRows Then
       Return True
    Else
       Return False
    End If
 Return ""
 End IF


In your page load or load complete,call CheckID() and insert ID into it.

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

 If CheckID("<your ID here>") = True Then
 Response.Redirect("newpage.aspx")
 Else
 Response.Write("<a href=""page.aspx"">Error. There is no page ID  in our database</a>"
 End If

Questionasp.net 2010 debugging Pin
classy_dog19-Sep-11 6:51
classy_dog19-Sep-11 6:51 
AnswerRe: asp.net 2010 debugging Pin
Pete O'Hanlon19-Sep-11 7:50
mvePete O'Hanlon19-Sep-11 7:50 
QuestionC# main in asp.net Pin
classy_dog19-Sep-11 6:17
classy_dog19-Sep-11 6:17 
AnswerRe: C# main in asp.net Pin
ekolis19-Sep-11 7:15
ekolis19-Sep-11 7:15 
QuestionResponse slow while connecting to DB2 Pin
Member 322226419-Sep-11 6:09
Member 322226419-Sep-11 6:09 
QuestionHow to call a method based on two asynchronous response handlers completed in ASP.NET and C#? Pin
rams218-Sep-11 20:03
rams218-Sep-11 20:03 
Questionabout connectivity of share market database. Pin
ohm_desai18-Sep-11 3:27
ohm_desai18-Sep-11 3:27 
AnswerRe: about connectivity of share market database. Pin
Ramkumar_S18-Sep-11 21:21
Ramkumar_S18-Sep-11 21:21 
AnswerRe: about connectivity of share market database. Pin
MaulikDusara19-Sep-11 2:13
MaulikDusara19-Sep-11 2:13 
Questionhow to show news on my page in between marquee using asp.net Pin
umeshdaiya18-Sep-11 3:19
umeshdaiya18-Sep-11 3:19 
AnswerRe: how to show news on my page in between marquee using asp.net Pin
m@dhu18-Sep-11 3:38
m@dhu18-Sep-11 3:38 
GeneralRe: how to show news on my page in between marquee using asp.net Pin
subhash11118-Sep-11 6:00
subhash11118-Sep-11 6:00 
GeneralRe: how to show news on my page in between marquee using asp.net Pin
umeshdaiya18-Sep-11 21:58
umeshdaiya18-Sep-11 21:58 
QuestionProblems connecting to AS/400 Pin
Member 322226418-Sep-11 1:29
Member 322226418-Sep-11 1:29 
QuestionPayPal Instant Payment Notification(IPN) Issue.. Pin
NetMan201217-Sep-11 8:45
NetMan201217-Sep-11 8:45 
AnswerRe: PayPal Instant Payment Notification(IPN) Issue.. Pin
Richard Andrew x6417-Sep-11 16:22
professionalRichard Andrew x6417-Sep-11 16:22 
AnswerRe: PayPal Instant Payment Notification(IPN) Issue.. Pin
MaulikDusara18-Sep-11 21:00
MaulikDusara18-Sep-11 21:00 

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.