Search Results

Search found 3 results on 1 pages for 'user302004'.

Page 1/1 | 1 

  • ASP.NET DropDownList Replacement

    - by user302004
    Currently, I'm populating a drop down list when a file is created in a configurable folder. if (!downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.FullName)) Then, I add the file and remove "No Responses Available". However, if the same file is resubmitted (i.e., the file name is the same but the timestamp is different), then I want to remove the older entry and replace it with a new entry in the drop down list. I have the filename, so I go into the "else" block from the line of code above. From there, I'm checking to see if I have the same filename and a different creation time. if (downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.FullName) && downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.CreationTime) From here, I want to find the position, remove it, and add the new text. This approach isn't working. Can anyone offer an alternate approach?

    Read the article

  • How do I obtain the version information for my Windows Service programmatically

    - by user302004
    I need to obtain the version of my Windows service programmatically and store it in a string. Then, I'll append the version to my display name and service name in the ProjectInstaller class. Right now I'm getting an empty string and I'm having trouble debugging my setup project. Here's my current code: string version = null; try { Assembly exeAssembly = Assembly.GetEntryAssembly(); Type attrType = typeof(AssemblyFileVersionAttribute); object[] attributes = exeAssembly.GetCustomAttributes(attrType, false); if (attributes.Length 0) { AssemblyFileVersionAttribute verAttr = (AssemblyFileVersionAttribute)attributes[0]; if (verAttr != null) { version = verAttr.Version; } } } catch { } if (version == null) { version = string.empty; }

    Read the article

  • Programmatically Setting the Version of a Window's Service on the ProjectInstaller

    - by user302004
    I have a Windows Service created in Visual Studio 2005 in C#. I have a setup project and a ProjectInstaller class. I also have code to programmatically get the version from the AssemblyFileVersionAttribute. I need to figure out where I set the version that I've obtained (and where this code should go). I tried placing it in the InitializeComponent method on ProjectInstaller.Designer.cs and then appending the version to serviceInstaller1.DisplayName and serviceInstaller1.ServiceName. This didn't work and you're not supposed to modify the contents of this method. Any ideas?

    Read the article

1