Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
W

Walter_H

@Walter_H
About
Posts
26
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • FormsAuthentication
    W Walter_H

    As I said before, you have to catch System.Threading.ThreadAbortException. ThreadAbortException is thrown exactly after you do a Response.Redirect. This is normal and it's because the .NET-Framework informs itself that the current thread is beeing aborted. Your problem was that you generally catch every type of exception. Instead you must catch the ThreadAbortException BEFORE you catch any other Exception types. Before you go on, take a look on the documentation of "System.Threading.ThreadAbortException", afterwards it will be clear why you get the message "Thread was being aborted." so change your code to this: Try 'call the ValidateLogin function If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then If Request.Params("ReturnUrl") <> "" Then FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True) Else If iStatus = 1 Then Response.Redirect("EntrySubscriberDtls.aspx") Else Response.Redirect("ViewSubscriberDtls.aspx") End If End If Else Response.Redirect("VendorLogin.aspx", True) lblErrorMsg.Text = "Invalid UserName or Password" End If Catch ex as System.Threading.ThreadAbortException ' Do nothing here, just catch the exception Catch ex As Exception 'Throw error Message lblErrorMsg.Text = ex.Message End Try hope that helps - walter

    ASP.NET design sysadmin help

  • FormsAuthentication
    W Walter_H

    hi! your problem is the Server.Transfer method in both cases. you have to do a Response.Redirect(...) with the client so that he gets the auth-cookie. have a look at the differences of both methods in your VS-help. Make sure that you catch ThreabAbortException which is thrown by Response.Redirect. in your case: Private Sub imgbtnSubmit_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgbtnSubmit.Click Try ... Catch exc as ThreadAbortException ' Do nothing here Catch ex As Exception 'Throw error Message txtLoginId.Value = "" txtPassword.Value = "" lblErrorMsg.Text = "Invalid Username or Password" End Try End Sub -walter

    ASP.NET design sysadmin help

  • http://path/[Username] - Virtual Directory?
    W Walter_H

    try googling 'URL Rewriting'. i think this is exactly what you need. - walter

    ASP.NET

  • Retrieving Full URL from a relative url
    W Walter_H

    HttpContext.Current.Request.Url.AbsoluteUri - walter

    ASP.NET

  • authentication
    W Walter_H

    Have a look at the documentation of HttpContext.SkipAuthorization property. - walter

    ASP.NET security help

  • XML using XSL
    W Walter_H

    Hi Feroze! Why aren't you using the XML-Control (found in the Toolbox)? With this you just need to apply the XML-Source and the transformation file. e.g: Dim xmlDoc As New XmlDocument() xmlDoc.Load("your path to the xml-data goes here") With yourXmlControl .Document = xmlDoc .TransformSource = "your path to the xsl-file goes here" End with This is all what needs to be done. - walter

    ASP.NET xml help sysadmin

  • help required
    W Walter_H

    try this: it will find all HTML comments within the source. greetings walter

    ASP.NET regex html help question

  • Right Click Disable
    W Walter_H

    have you ever heard of fiddler?[^] what you are trying to do is not possible as long as tools like fiddler are available for everyone.

    ASP.NET help

  • Count String Relpacements using Replace Function
    W Walter_H

    before doing the replacement you could use RegEx.Matches(InputString,SearchPattern).Count. BTW: RegEx.Replace is also a good method to do string-replacements. - walter

    .NET (Core and Framework)

  • database problem in vb.net
    W Walter_H

    your're right! sorry - walter

    Visual Basic csharp database help

  • update data from datagrid using ado in vb.net
    W Walter_H

    can be easily found in the MSDN! everything can be done by using the DataAdapter. example from MSDN: ' Assumes connection is a valid SqlConnection. Dim adapter As SqlDataAdapter = New SqlDataAdapter( _ "SELECT CategoryID, CategoryName FROM Categories", connection) adapter.UpdateCommand = New SqlCommand( _ "UPDATE Categories SET CategoryName = @CategoryName " & _ "WHERE CategoryID = @CategoryID", connection) adapter.UpdateCommand.Parameters.Add( _ "@CategoryName", SqlDbType.NVarChar, 15, "CategoryName") Dim parameter As SqlParameter = adapter.UpdateCommand.Parameters.Add( _ "@CategoryID", SqlDbType.Int) parameter.SourceColumn = "CategoryID" parameter.SourceVersion = DataRowVersion.Original Dim dataSet As DataSet = New DataSet adapter.Fill(dataSet, "Categories") Dim row As DataRow = dataSet.Tables("Categories").Rows(0) row("CategoryName") = "New Category" adapter.Update(dataSet, "Categories") -walter

    Database csharp help announcement

  • Object variable or With block variable not set.
    W Walter_H

    i think it would be much more easier if you wrote a class that holds the data and put cllas-instances into an ArrayList: ' The class that holds the data class mydata public StringValue as string public IntValue as integer public BoolValue as Boolean end class ' Your Function Spot Function Spot() As ArrayList Dim ObjArray As New ArrayList() Dim clsInstance1 As New mydata Dim clsInstance2 As New mydata With clsInstance1 .StringValue = "Hello World" .IntValue = 69 .BoolValue = False End With With clsInstance2 .StringValue = "Hello Again" .IntValue = 96 .BoolValue = True End With ObjArray.Add(clsInstance1) ObjArray.Add(clsInstance2) Return ObjArray End Function ' in your Button-Click: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Dim arrList as ArrayList = Spot() MsgBox(arrList(1).IntValue.ToString()) End Sub - walter

    Visual Basic csharp data-structures

  • database problem in vb.net
    W Walter_H

    you can do this by querying the DataSet's table-Collection with the method Contains. e.g: Dim ds As New DataSet ... If ds.Tables.Contains("YourTableName") Then ... End If - walter

    Visual Basic csharp database help

  • How Redirecting Page to same...
    W Walter_H

    by pressing enter normally the default-control's event is fired. i.e if you have a submit-button on your site then probably this one is pressed. -walter

    ASP.NET csharp asp-net help

  • Weird Issue with IF Statement
    W Walter_H

    if you want to compare two date-values you shouldn't cast them to strings. use the DateTime.Compare or DateTime.CompareTo methods instead. i.e if(dayDate.CompareTo(DateTime.Parse(Request.QueryString("enddate")) == 0) { // do something here, if the dates are equal } else { ... } - walter

    ASP.NET help

  • Newline in regular expression validation...
    W Walter_H

    well...;) there's probably a problem with the view-state in your site, i don't know. maybe you'll find these links helpful: RegExLib[^] and RegEx-Coach[^] for testing your regular expressions. good luck walter

    ASP.NET question com regex

  • Newline in regular expression validation...
    W Walter_H

    try this one: ([0-9a-zA-Z _\+-\.\*\(\)&#%':!\n"])+ hope that helps walter

    ASP.NET question com regex

  • Newline in regular expression validation...
    W Walter_H

    what exactly do you want to validate? give me an example of the validated text and the rules you want to apply walter

    ASP.NET question com regex

  • Moving The Mouse/Cursor Then Button Click ?
    W Walter_H

    i guess the right way would be the SendMessage function. use it with the parameter WM_LBUTTONUP. walter

    C / C++ / MFC question

  • Newline in regular expression validation...
    W Walter_H

    have you tried to remove the "^" and "$" characters?these specify the beginning("^") and the end("$") of a line.so it makes no sense if "\n" is placed between these two. walter

    ASP.NET question com regex
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups