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
E

ESTAN

@ESTAN
About
Posts
119
Topics
30
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Recent problem with UpdateProgress
    E ESTAN

    Nevermind, I found out that I had tag that wasn't closed properly. Instead of <b>text<b> it should be <b>text</b> Is there a tool that can be used to find out this kind of errors?

    ASP.NET help question

  • Recent problem with UpdateProgress
    E ESTAN

    Hi, I noticed since a couple of days that after a AsyncPostBack, the UpdateProgress doesn't disappear. It seems to happen only on IE, in Firefox it closes correctly after the AsyncPostBack. The updatepanel I am using used to work perfectly till recently, the website is still under development and I don't have a clue what is causing this problem. Anyone came across a similar problem? Or does anyone can help me finding the problem?. Thanks

    ASP.NET help question

  • Local Server
    E ESTAN

    You can use google to search for step by step guides. IIS can be set up both on WinXP and Win2003. Here you have a tutorial for WinXP: http://www.velocityreviews.com/forums/t367349-setup-your-own-webserver-on-winxp.html[^]

    ASP.NET sysadmin

  • SUM
    E ESTAN

    I don't know exactly what you mean, but I understand it as the following. If Sum(...) Is NULL, Use value XXX You should look at the function COALESCE http://msdn.microsoft.com/en-us/library/ms190349(SQL.90).aspx[^] And you would like to use it as so: COALESCE(SUM(Udgifter.Brugtbeløb),XXX) where XXX is the default value.

    ASP.NET question

  • Gridview selected row issue
    E ESTAN

    Like d@nish is saying. verify if you have a selected row. if (gvColumns.SelectedRow.Count > 0) { lblErrorImport.Text = gvColumns.SelectedRow.Cells[1].Text; }

    ASP.NET help question

  • stored procedure
    E ESTAN

    Nice I didn't know that, although this isn't really an error so I prefer to use Output parameters to send the info back to the client app.

    ASP.NET database regex announcement

  • stored procedure
    E ESTAN

    Hi, You could use Output parameters to show messages. An example: CREATE PROCEDURE [dbo].[PN_ChangePassword] ( @UserID int, @Password int, @OldPassword int, @NewPassword int, @ConfirmPassword int, @Message varchar(255) OUTPUT, ) AS BEGIN SET NOCOUNT ON; IF(NOT @OldPassword = @Password) BEGIN SELECT @Message = 'Password does not match Original' END ELSE BEGIN UPDATE BaselAnfouqa_Clients SET Password = @NewPassword WHERE UserID=@UserID AND Password=@OldPassword SELECT @Message = 'OK' END END So if you execute this stored procedure from code you should gather the output parameters so you can use them.

    ASP.NET database regex announcement

  • ASP .NET based centralized application !!!
    E ESTAN

    What he is trying to say, that it is not necessary that you create a ASP.NET application. Your current win application needs to have one kind of communication with the centralized database. For this you could use a webservice installed on that centralized server that performs the communication between the outside world and the database. And your application needs to be modified so that it can consume this webservice. In other words consult, insert, update and delete. It's nice and clean but you should think of alternatives before starting of. Communication with a webserver can expose data, you can't loose the security behind this idea.

    ASP.NET database question csharp asp-net sql-server

  • Confused about property
    E ESTAN

    Thanks, than I will keep only the 'reference' to this object. Private Shared sConString As String = System.Configuration.ConfigurationManager.ConnectionStrings.Item("ConnectionString").ConnectionString

    Visual Basic database question workspace

  • Confused about property
    E ESTAN

    So, it is better that I use only Private Shared sConString As String = System.Configuration.ConfigurationManager.ConnectionStrings.Item("ConnectionString").ConnectionString Isn't that so that every time I ask for sConString, he will lookup the connection string in the web.config? Or I can do the following ? Private Shared sConString As String = "" Public Sub New() sConString = System.Configuration.ConfigurationManager.ConnectionStrings.Item("ConnectionString").ConnectionString End Sub

    Visual Basic database question workspace

  • Confused about property
    E ESTAN

    Hi, I don't know if it is a good practice what I am doing here. I have a class that is making the connections to the database. The connection string I save in the web.config. And this is the property that I used inside that class to get the connectionstring. Does it make sense?

    ''' ''' This variable holds the db connection string.
    ''' The value of the db connection string is saved in the web.config.
    ''' 
    Private Shared sConString As String = System.Configuration.ConfigurationManager.ConnectionStrings.Item("ConnectionString").ConnectionString
    
    Private Shared ReadOnly Property ConString() As String
    	Get
    		Return sConString
    	End Get
    End Property
    
    Visual Basic database question workspace

  • Best practice static class or static variables.
    E ESTAN

    Hi, I have a question about static. I have the following class: public class Members { static public string Administrator = "A"; } Because I would mark the variable Administrator as a Const, I changed the class to the following: static public class Members { public const string Administrator = "A"; } In my eyes, the behavior is the same in accessing the variable, only that you are not able to change the Variable. Is this correct? Or do I need to use the keyword readonly instead of const? Than I would have: public class Members { static public readonly string Administrator = "A"; } So, help me out by saying what is the best practice here. Thanks.

    C# question help discussion

  • Looking for team members for .NET 3.5 project
    E ESTAN

    Hi, I am looking for someone or a group of people to work on an open source project in .NET 3.5 This question is probably not common over here, but I think it can be challenging to find strong motivated persons over here. The project is big and can be challenging for everyone who likes to spend time in a team/community development, improve there coding skills. Money we are not going to win, since we will make it as an open source project hosted on Sourceforge for example. Also we will post them on Code Project as an article. (like ToDoList for example) To let you know: (I am feeling that I need that clear out from the beginning.) This is not a school project, I am working. This isn't a work project, since I personally thought about it in order to create a nice open source app in .NET 3.5. Would you like to know more? mail me: estanito[at]gmail[dot]com I hope we can accomplish this nice project and share it with the whole Code Project community and all the developers abroad.

    WCF and WF question csharp com collaboration tutorial

  • FormsAuthentication and Session timeout problem.
    E ESTAN

    Sorry, i was a bit out. I did a check on FormsAuthentication.CookiesSupported and it says true (i logged it to a file) So i am a bit clueless here why this is happening. webconfig: <system.web> <sessionState timeout="60"/> </system.web> <system.web> <authentication mode="Forms"> <forms path="BackOffice" loginUrl="BackOffice/Default.aspx?state=Timeout" defaultUrl="BackOffice/Home.aspx" timeout="55" cookieless="UseCookies"> </forms> </authentication> <authorization> <!--<allow users="*"/>--> <deny users="?"/> </authorization> </system.web> The validation code: Protected Sub btnValidate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnValidate.Click Dim dt As DataTable = db.GetData("SELECT Active FROM tblUsers WHERE Email = '" & tbxEmail.Text.Trim & "' and Password = '" & Replace(tbxPassword.Text, "'", "''") & "'") If (dt.Rows.Count = 0) Then ' This means that the combination of the email address and the password could not be found in the database lblLoginMessage.Text = CType(ViewState("vsAlerts"), Hashtable)("Alert1").ToString Else If (CType(dt.Rows(0)(0), Int32) = 0) Then ' This means that the user is not allowed to log in, the Active bit is set to 0 lblLoginMessage.Text = CType(ViewState("vsAlerts"), Hashtable)("Alert2").ToString Else Session.Add("User", tbxEmail.Text.Trim) Session.Add("Date", DateTime.Now.ToString) Session.Add("Active", 1) Common.LogInfo("FormsAuthentication.CookiesSupported: " & FormsAuthentication.CookiesSupported(), 3, Parameters.LOG_FILE, "clssDbAccess.SetData") FormsAuthentication.RedirectFromLoginPage(tbxEmail.Text.Trim, False) End If End If End Sub

    ASP.NET security help question

  • FormsAuthentication and Session timeout problem.
    E ESTAN

    Well i tried it, I've set the timeout to 55 minutes, added the defaultUrl and the cookieless attribute. I changed all my code to that single line FormsAuthentication.RedirectFromLoginPage(email, false) Well i can't seem to get it work, it calls immediately the login page again. http://localhost:4190/TEST/BackOffice/Default.aspx?state=Timeout&ReturnUrl=%2FTEST%2FBackOffice%2FHome.aspx I don't get it. Any idea why this is happening?

    ASP.NET security help question

  • FormsAuthentication and Session timeout problem.
    E ESTAN

    Hi, I kind figure out the problem why the FormsAuthentication cookie can't be set, because just after the authentication it brings me back to the same page with the message that my session has been expired. Lets see my webconfig.

    <system.web>
    <authentication mode="Forms">
    <forms path="BackOffice" loginurl="BackOffice/Default.aspx?state=Timeout" protection="All" timeout="1">
    </forms>
    </authentication>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web>

    The state=Timeout is caught to show an alert saying that the session has been timed out The code that i use just after a successful authentication: 'FormsAuthentication.SetAuthCookie(tbxEmail.Text.Trim, False) FormsAuthentication.RedirectFromLoginPage(tbxEmail.Text.Trim, True) Response.Redirect("Home.aspx") After a successfull authentication I don't get directed to the Home.aspx page. When i set the following in the webconfig: <forms path="BackOffice" loginUrl="BackOffice/Default.aspx?state=Timeout" protection="All" timeout="1" cookieless="UseUri"> but than my string changes to something like: http://localhost:4190/TEST/(F(DkeaiAh5OWpUmiVajjisadVvodQMLp1lpg4yu8pQK\_PlxqApl5udnh7iAx1Yi8KhNbLIx6pQkytYVuhnwCj7GmfkbmpD-2IxXSxyilQM5HDrQ9-byppwLdbd\_uBxEeSNdo5UNcPd9nxQxW0ZU3o3Sw2))/BackOffice/Home.aspx What I am doing wrong? How i can use normal cookies zo i don't need to have the UseUri flag? Thanks

    ASP.NET security help question

  • Convert an Image, encoded in hex, back to an image file
    E ESTAN

    I think i have found it. Searching hard and trying end up with nothing, asking help and the answers suddenly comes. O well, here i'll give you the solution. (Remind that the hex value is just a part of whole string) Private Sub ConvertImg() Dim hexvalue As String = "FFD8FFE000104A46494600010101000100010000..." Dim bytevalue As Byte() = HexToBin(hexvalue) Dim myFileStream As FileStream Dim intByte As Integer = 0 Dim lngLoop As Long Try intByte = bytevalue.Length myFileStream = File.OpenWrite("c:\image.jpg") For lngLoop = 0 To intByte - 1 myFileStream.WriteByte(bytevalue(lngLoop)) Next myFileStream.Close() Catch ex As IOException MessageBox.Show(ex.Message) End Try End Sub '--------------------------------------------------------------------------- ' ' Function: HexToBin() ' Input: s ' Return: bytes ' Purpose: Converts Hex to binary ' '--------------------------------------------------------------------------- Public Shared Function HexToBin(ByVal s As String) As Byte() Dim arraySize As Integer = CInt(s.Length / 2) Dim bytes(arraySize - 1) As Byte Dim counter As Integer For i As Integer = 0 To s.Length - 1 Step 2 Dim hexValue As String = s.Substring(i, 2) ' Tell convert to interpret the string as a 16 bit hex value Dim intValue As Integer = Convert.ToInt32(hexValue, 16) ' Convert the integer to a byte and store it in the array bytes(counter) = Convert.ToByte(intValue) counter += 1 Next Return bytes End Function

    Visual Basic question

  • Convert an Image, encoded in hex, back to an image file
    E ESTAN

    Hi all, I have a image that is converted into a hex string (note see below). I would like to convert this hex string back into the image. How can I start with this? Can someone point me out in accomplishing this? Thank you very much. Here under you can find 'a part of' the hex string. FFD8FFE000104A46494600010100000100010000FFFE002A496E74... Edit, i removed the biggest part of the hex string because i doesn't look right in this forum. But you can get an idea how it looks like.

    Visual Basic question

  • Blocking specific URLs
    E ESTAN

    If you created a browser function into your program, you can keep up a black list whereto you will validate first the url which the user has given before you go on with it. Is this what you are looking for?

    Visual Basic question csharp

  • Boolean in Subroutines.
    E ESTAN

    I don't see the problem where the showFiles boolean should be true at start or where it can be changing. What you can do (not totally sure, but at least you can try) change Sub DisplayDirTree(ByVal dir As String, ByVal showFiles As Boolean, Optional ByVal level As Integer = 0) to Private Sub DisplayDirTree(ByVal dir As String, Optional ByVal showFiles As Boolean = False, Optional ByVal level As Integer = 0) So, make it private, and make the showFiles Optional to False. Let us know what it does. another thing you can do is set a break on the beginning of the sub and Watch the variable showFiles, is it set the way you want it, and while you step through your code, does it got changed?

    Visual Basic help question
  • Login

  • Don't have an account? Register

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