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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
F

foobarDividedByZero

@foobarDividedByZero
About
Posts
4
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • problems casting an object to a listbox
    F foobarDividedByZero

    Hi, I have a series of pages to create that will each have a bunch of listboxes on them, each containing a listing of files in a directory. I'm trying to get the page down to basics where i only have to plug in the correct paths to the folders, but I'm hitting a problem casting 'object sender' to a listbox - the SelectedItem is always the first item, not what was actually selected. here is the entire code-behind (stripped down to basics): public partial class departments_safety_play : System.Web.UI.Page { private static readonly string year = DateTime.Now.Year.ToString(); private static readonly string root = @"../..//FIBRELINE/"; private readonly string pathFibrelineA = string.Format(@"{0}{1}/A-SHIFT/", root, year); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string folderToBrowse = Server.MapPath(pathFibrelineA); utilityLib.ShowFilesInWithValue(folderToBrowse, lstFibrelineA, pathFibrelineA); } } protected void lbSelectedIndexChanged(ListBox lb) { string dir = lb.SelectedValue + lb.SelectedItem.Text; string popupScript = "" + "window.open('" + dir + "', 'CustomPopUp', " + "'width=600, height=500, menubar=1, resizable=1, location=1')" + ""; ClientScript.RegisterStartupScript(GetType(), lb.SelectedItem.Text, popupScript); } protected void SelectedIndexChanged(object sender, EventArgs e) { ListBox lb = (ListBox) sender; lbSelectedIndexChanged(lb); } }

    ASP.NET design sysadmin help

  • how to create a data entry table?
    F foobarDividedByZero

    Hi all, I'm trying to make an asp.net data entry table work like they do in access. what i want is a one line table with 3 columns (a time picker, a drop down, and a comments section). When the line is fully populated, I'd like a new empty line to appear below so the user can continue to add any number of lines. I can't figure out any easy way to do this, and that usually means i'm missing something simple:) any help is greatly appreciated! thanks in advance, Craig

    ASP.NET csharp asp-net help tutorial question

  • flaky results with multiple listboxes
    F foobarDividedByZero

    I am returning via the back button. This is an intranet site, so these are actual word and excel docs on the network that i am linking to, not aspx pages. this is pretty much all the code there is... protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { //populate memos string folderToBrowse = Server.MapPath(memoPath); DirectoryInfo dirInfo = new DirectoryInfo(folderToBrowse ); foreach (FileInfo fileItem in dirInfo.GetFiles()) { lstMemos.Items.Add(fileItem.Name); } } //I populate 2 more listboxes here - same code } //there are 2 more functions just like this for the other 2 listboxes protected void lstMemos_SelectedIndexChanged(object sender, EventArgs e) { Response.Redirect(Path.Combine(memoPath, lstMemos.SelectedItem.Text)); }

    ASP.NET help sysadmin

  • flaky results with multiple listboxes
    F foobarDividedByZero

    Hi, I'm having a problem that is slowly driving over the edge... I have a page with 3 listboxes that I populate dynamically with the names of files on the server. I have a SelectedIndexChanged event on each of the listboxes that simply redirects the page to the selected document. the problem is when i return from a document, i can only select a new doc if it is from the same listbox, or one on the left. If I select from a listbox on the right, the last doc opened comes up again. Thanks in advance for any help, Craig

    ASP.NET help sysadmin
  • Login

  • Don't have an account? Register

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