Click here to Skip to main content
15,867,686 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionasp.net vb Pin
NadaSaif5-Dec-12 3:09
NadaSaif5-Dec-12 3:09 
AnswerRe: asp.net vb Pin
ZurdoDev5-Dec-12 4:34
professionalZurdoDev5-Dec-12 4:34 
GeneralRe: asp.net vb Pin
NadaSaif5-Dec-12 5:05
NadaSaif5-Dec-12 5:05 
GeneralRe: asp.net vb Pin
ZurdoDev5-Dec-12 7:17
professionalZurdoDev5-Dec-12 7:17 
AnswerRe: asp.net vb Pin
jkirkerx5-Dec-12 17:22
professionaljkirkerx5-Dec-12 17:22 
GeneralRe: asp.net vb Pin
NadaSaif6-Dec-12 1:56
NadaSaif6-Dec-12 1:56 
AnswerRe: asp.net vb Pin
jkirkerx6-Dec-12 7:32
professionaljkirkerx6-Dec-12 7:32 
GeneralRe: asp.net vb Pin
jkirkerx6-Dec-12 11:36
professionaljkirkerx6-Dec-12 11:36 
Just off the top of my head, I write in vb, not that quick in c sharp. But I put about 10 minutes into it just to test 1 char. I would have to come back to convert the program to test char positions 2-4-6-7. I'm a little fuzzy on integer array, in which I can loop the Integer array of p1 to test 2-4-6-7 in the same loop, and produce a exit code such as 0 for success or 1 for failure.

[edit]
If I used the integer array of p1 for looping, I could just match the int value to the char position much faster. But that's my weakness.
Dim p1() as Integer = 2467

Anyways this is just a starter thought
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load

        Dim uPassword() As Char = "fortune"
        Dim p1 As Integer = 2
        Dim p1c As Char = "r"
        Dim pMatch As Integer = 1

        Dim input(uPassword.Length - 1) As Char
        For i As Integer = 0 To uPassword.Length - 1
            'Just building the password char array to validate the thought
            input(i) = uPassword(i)

            If (p1 = i) Then
                If (uPassword(i) = p1c) Then
                    pMatch = 0
                End If
            End If
        Next

        Response.Write("<span style=""color: black;"">" & input & "</span>" & _
            "<br /><span style=""color: black;"">" & pMatch.ToString & "</span>")

    End Sub

GeneralRe: asp.net vb Pin
NadaSaif12-Dec-12 5:03
NadaSaif12-Dec-12 5:03 
GeneralRe: asp.net vb Pin
jkirkerx12-Dec-12 5:55
professionaljkirkerx12-Dec-12 5:55 
GeneralRe: asp.net vb Pin
NadaSaif12-Dec-12 21:14
NadaSaif12-Dec-12 21:14 
Question70-513 Video Tutorial Please Pin
silentspeaker5-Dec-12 2:45
silentspeaker5-Dec-12 2:45 
AnswerRe: 70-513 Video Tutorial Please Pin
Richard MacCutchan5-Dec-12 2:55
mveRichard MacCutchan5-Dec-12 2:55 
GeneralRe: 70-513 Video Tutorial Please Pin
silentspeaker5-Dec-12 7:05
silentspeaker5-Dec-12 7:05 
QuestionDataList with Product Heads. Pin
Asif Rehman4-Dec-12 7:17
Asif Rehman4-Dec-12 7:17 
AnswerRe: DataList with Product Heads. Pin
Himanshu Yadav4-Dec-12 18:53
Himanshu Yadav4-Dec-12 18:53 
QuestionHI,how to do access sqlserver use windows domain user? Pin
xut24473-Dec-12 19:20
xut24473-Dec-12 19:20 
AnswerRe: HI,how to do access sqlserver use windows domain user? Pin
J4amieC3-Dec-12 22:24
J4amieC3-Dec-12 22:24 
GeneralRe: HI,how to do access sqlserver use windows domain user? Pin
AnalogNerd4-Dec-12 4:25
AnalogNerd4-Dec-12 4:25 
Questionaspnet_wp process crash Pin
Kishore Hyd3-Dec-12 12:11
Kishore Hyd3-Dec-12 12:11 
QuestionRe: aspnet_wp process crash Pin
ZurdoDev5-Dec-12 4:36
professionalZurdoDev5-Dec-12 4:36 
JokeRe: aspnet_wp process crash Pin
jkirkerx5-Dec-12 17:27
professionaljkirkerx5-Dec-12 17:27 
Questionexit from a masterpage Pin
juan manuel rdz3-Dec-12 8:01
juan manuel rdz3-Dec-12 8:01 
GeneralRe: exit from a masterpage Pin
AmitGajjar3-Dec-12 18:09
professionalAmitGajjar3-Dec-12 18:09 
AnswerRe: exit from a masterpage Pin
Himanshu Yadav4-Dec-12 18:47
Himanshu Yadav4-Dec-12 18:47 

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.