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
J

John Kuhn

@John Kuhn
About
Posts
461
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Passing Data between different web sites
    J John Kuhn

    You could start with the HttpWebRequest and HttpWebResponse classes in System.Net; these allow you to interact directly with a site via HTTP. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic question csharp

  • Trying To Submit Data To A Web Server Using VB.Net
    J John Kuhn

    How about creating a web service, publishing the service on your web server, then invoking the web service from within your windows forms application? It's much simpler than creating and posting a http request and parsing the http response. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic csharp database sysadmin help

  • changing career, vb.net to C#
    J John Kuhn

    Glad I could help. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Work Issues career csharp c++ javascript

  • changing career, vb.net to C#
    J John Kuhn

    Knowing one or the other alone could be detrimental -- knowing both can't hurt. There is also a profound difference between real managers (who should be able tell the difference between a respectable programmer and a bulls&*t artist) and recruiters; recruiters are typically trying to pigeonhole you, label you and categorize you as one thing or the other. If possible, avoid HR, recruiters and their ilk and find out who the actual person making the hiring decision is, and talk to that person... hopefully he or she is a sensible person with a technical background who will recognize your ambidexiterity as a benefit. In the market at large, it simply varies from one project to another, from one customer to another; some are dedicated to one language/platform only, whether it is Java, C# or Visual Basic.NET; others could care less, as long as the job gets done and the project is delivered. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Work Issues career csharp c++ javascript

  • 2 dimensional array? class alternative?
    J John Kuhn

    Right... the Dim statement is limited to declaring variables within Functions or Subs, any other declarations in your classes or modules must be marked Public, Private or Protected. Does that help? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic help csharp database sysadmin

  • 2 dimensional array? class alternative?
    J John Kuhn

    Something like this should address your question:

    Public Structure FtpSite
    Public Hostname As String
    Public Username As String
    Public Password As String
    Public Port As Integer
    End Structure

    Public Class UsesFtpSite

    Public Sub MyMethod()
    
        Dim al As New ArrayList
    
        Dim fs As New FtpSite
    
        fs.Hostname = "ftp.mysite.com"
        fs.Port = 21
        fs.Username = "user"
        fs.Password = "password"
    
        al.Add(fs)
    
    End Sub
    

    End Class

    Although, it is also possible to use a class in this situation as well. Another alternative might be to create a DataTable in memory. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic help csharp database sysadmin

  • VB.NET Excell Cell Formatting
    J John Kuhn

    [In reply to your other posting...] As is often the case, Dave beat me to the punch. I was gonna say the same thing, dammit. ;) What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic question csharp database help

  • placeholder
    J John Kuhn

    Well... one of the original principles of structured programming is that you can and should break large tasks down into smaller tasks, and each task -- a function or a procedure ("sub" in VB.NET) -- can have parameters passed by the calling procedure. So, in this case, you could create one or more subs or functions, either with the "e" as a parameter, or one or more subs or functions that take as their parameter(s) a value of a property of "e":

    Private Function DoSomething(ByVal e As DayRenderEventArgs) As Label
    ' ...
    End Function

    or,

    DoSomethingElse(e.Day.IsOtherMonth)
    Private Sub DoSomethingElse(ByVal isOtherMonth As Boolean)
    ' ...
    End Sub

    OK? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • placeholder
    J John Kuhn

    So, also try creating new values in Session() that indicate whether or not another something or other has already been created and needs to be recreated on post-back. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • placeholder
    J John Kuhn

    Right, I'd try the same thing. So, you would have one method callable from wherever you choose that would create a new image button in a container:

    Private Function CreateImageButton(...) As ImageButton
    ' ...
    End Function

    Private Sub Calendar_DayRender(...) Handles Calendar.DayRender
    ' ...
    e.Controls.Add(CreateImageButton(...))
    End Sub

    Private Sub ReCreateImageButtons(...)
    For i As Integer = 1 To MyNumberOfControls
    something.Controls.Add(CreateImageButton(...))
    Next
    End Sub

    Of course, this is just a rough sketch... I don't have enough time right now to write real code and make sure that it works. I wrote this in the "Text" window of CodeProject, not in VS or anything... What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • placeholder
    J John Kuhn

    When you create a control, give it an ID. When you re-create it, give it the same ID. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • placeholder
    J John Kuhn

    Which part -- the DayRender event or the CreateCalendar method or the setting of a session variable to indicate something already done? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • Add-in problem opening word file with write permission
    J John Kuhn

    Some of it is here[^], but the best bet is to look right inside the help file for Word, etc., the go to the section called "Programming Information". What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic help question

  • placeholder
    J John Kuhn

    Well, yes... I'm not certain which snippet you're referring to, but in general, bear in mind that you're writing code that responds to particular events and each control event is independent of others on the same page, except for the page level events, that fire each time the page loads or posts. So, if, for example, I write an event handler for a button that creates a checkbox dynamically and stores some indication of that in Session, and later on I write an event handler that responds to the click event of another control that also dynamically creates something, I have to store some other indicator of that in Session as well, and so on, for each thing that I do. Do you see? If need be, I can point to the places in MSDN that describe the sequence of events and ASP session or state management. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • Dropdownlist Database Entry
    J John Kuhn

    Unless you're using some non-standard environment that I've never seen, the correct answer is:

    Dim value As String = DropDownList1.SelectedValue

    There is no "Text" property of a drop-down list in ASP.NET. Hope it all works out for you. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET tutorial database question

  • placeholder
    J John Kuhn

    Sorry, :(( My brain ceased to function on this one. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • VB6
    J John Kuhn

    * MSDN still contains stuff on VB6. * CodeProject has a variety of samples and articles still geared towards VB6. * Try Googling "Visual Basic 6.0" * There are a variety of other VB community sites that, although placing a more visible emphasis on VB.NET, still contain plenty of things regarding VB6. * Check out Amazon.com and see what books are still available. All in all, there are still things to do with VB6 and still companies interested in doing them... but if you are just starting out, odds are that you're not going to get up to speed too quickly, and by the time you do, the VB6 stuff is going to be less prevalent than it is today. So, my last suggestion is this: why not start learning VB.NET? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic tutorial question

  • Add-in problem opening word file with write permission
    J John Kuhn

    Did you run the same code before? And when you ran it before, did you close the document and shut down the instance of Word you created? If not, then a) there are 1...N instances of Word running (check your task list) and b) odds are, your word document is in use by one of them. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    Visual Basic help question

  • placeholder
    J John Kuhn

    Sorry about the delay -- Holiday weekend and all. I tried to get this to work, but I couldn't, either. :( Have you considered abandoning the default Calendar control and creating your own class? What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

    ASP.NET question

  • Inserting Multiple lines into a database
    J John Kuhn

    I tend to agree with Lauren. Make something like this:

    <form method="POST" action="thispage.asp">
    <table border="0" cellpadding="2" cellspacing="0">
    <tr>
    <td>Tape Name</td>
    <td>Type</td>
    <td>System</td>
    </tr>
    <tr>
    <td>
    <p><input type="text" name="T1" size="20"></p>
    </td>
    <td><select size="1" name="D1">
    <option value="1">Type 1</option>
    <option value="2">Type 2</option>
    <option value="3">Type 3</option>
    </select></td>
    <td><select size="1" name="D4">
    <option value="1">System 1</option>
    <option value="2">System 2</option>
    <option value="3">System 3</option>
    </select></td>
    </tr>
    <tr>
    <td><input type="text" name="T2" size="20"></td>
    <td><select size="1" name="D7">
    <option value="1">Type 1</option>
    <option value="2">Type 2</option>
    <option value="3">Type 3</option>
    </select></td>
    <td><select size="1" name="D9">
    <option value="1">System 1</option>
    <option value="2">System 2</option>
    <option value="3">System 3</option>
    </select></td>
    </tr>
    <tr>
    <td><input type="text" name="T3" size="20"></td>
    <td><select size="1" name="D8">
    <option value="1">Type 1</option>
    <option value="2">Type 2</option>
    <option value="3">Type 3</option>
    </select></td>
    <td><select size="1" name="D10">
    <option value="1">System 1</option>
    <option value="2">System 2</option>
    <option value="3">System 3</option>
    </select></td>
    </tr>
    </table>
    <p><input type="submit" value="Submit" name="B1"></p>
    </form>

    Then, when you post, check each of the textboxes and each of the drop down lists to determine if a value was entered or not. Yes, you could also use a checkbox that asks "enter more values" but that coul

    Web Development database
  • Login

  • Don't have an account? Register

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