Listbox control in Visual Web Developer not working correctly

Not sure where to post this issue.  I am developing a web app using Visual Web developer. I have created an .aspx page where I have placed a listbox control on the page and populate it when the page loads.  When I select an item from the list the
listindex value is always -1.  I can never get the index for the other values.  I've used the following code,but get the same results:
For i = 0 To ListBox1.Items.Count - 1
    If ListBox1.Items(i).Selected = True Then
        val= ListBox1.Items(i).Value 
    End If
Next
val=nothing, listindex is -1 when i check
Any idea how to get around this issue?
Thx

Hello,
The TechNet Sandbox forum is designed for users to try out the new forums functionality. Please be respectful of others, and do not expect replies to questions asked here.
As it's off-topic here, I am moving the question to the
Where is the forum for... forum.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

Similar Messages

  • Apache Web Server not working correctly

    Hello all,
    I have enabled web sharing and put a file in my "sites" folder under my username.
    I have instructed my friend to paste the link into his browser, he is using Leopard 10.5.5 as well, and it says that Safari can not find the server.
    The box is checked for web sharing, I gave him the link with my username at the end and the one without it and it still isn't working. In fact, even when I use localhost it says that Safari can not find the server....
    Is there anything else I need to do?

    I get the following when I run that:
    Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
    [-C "directive"] [-c "directive"]
    [-k start|restart|graceful|graceful-stop|stop]
    [-v] [-V] [-h] [-l] [-L] [-t] [-S]
    Options:
    -D name : define a name for use in <IfDefine name> directives
    -d directory : specify an alternate initial ServerRoot
    -f file : specify an alternate ServerConfigFile
    -C "directive" : process directive before reading config files
    -c "directive" : process directive after reading config files
    -e level : show startup errors of level (see LogLevel)
    -E file : log startup errors to file
    -v : show version number
    -V : show compile settings
    -h : list available command line options (this page)
    -l : list compiled in modules
    -L : list available configuration directives
    -t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
    -S : a synonym for -t -D DUMP_VHOSTS
    -t -D DUMP_MODULES : show all loaded modules
    -M : a synonym for -t -D DUMP_MODULES
    -t : run syntax check for config files
    So it doesn't like the command. If I run "#sudo /usr/sbin/apachectl -t", I get the error listed in my initial posting.
    Mike

  • Some web sites not working in FF but they are OK in Safari.

    A couple of times lately I have had web sites not work correctly with Firefox. I need to switch to Safari to complete the tasks I needed to do. My FF is running on Mountain Lion and is up to date.
    Thanks,
    MJT

    Hello michaeljt, the sites you have problem, is it with a lot of flash content ?
    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Please reload the webpage while bypassing the cache using '''one''' of the following steps:
    *Hold down the ''Shift'' key and click the ''Reload'' button with the left mouse key.
    OR
    *Press ''Ctrl'' + ''F5'' or ''Ctrl'' + ''Shift'' + ''R'' (Windows and Linux)
    *Press ''Command'' + ''Shift'' + ''R'' (Mac)
    See if this helps solve the issues you had and please report back to us!
    thank you

  • Visual Web Developer 2010 Express and Oracle ODAC - Oracle data provider

    system - xp pro
    Microsoft Visual Web Developer 2010 Express and Oracle ODAC112021.
    I can't seem to get the ODAC to work correctly with the Web Developer Express. When putting in a gridview I only see the standard adapters. The one from Oracle does not appear. I have spent days trying to figure out why but no luck. No one else seems to have this problem. I do not see any errors when I installed the ODAC. I've followed a few tutorials.
    http://weblogs.asp.net/nannettethacker/archive/2010/09/17/installing-oracle-data-access-components-odac.aspx
    and
    http://www.smart-soft-nz.com/oracle-and-asp-dot-net.html
    I tried using the Windows adapters but they just don't seem to work. I can get results in the query builder but when I go to the next step in the wizard I get the constraints error. I've done all the research on that with no luck so I wanted to use the ODAC. This killing me! This really shouldn't be that hard. I've added the dll to the references but again it's just not an option. If anyone could give me a little direction that would be great!!!!!!!!!!!!!!!!!!!!!!
    Thank you
    John

    Dear Friends,
    Installing SP1 and updates to it solved the first issue. So the database now seems to be of type 2008 R2.
    Deleting some files solved the second issue.
    However, another issue remains.
    My most important projects were created with a version of VWDX 2010 that was downloaded from Microsoft and installed on July 3, 2012. This version of VWDX has now been lost, because my hard drive recently ceased to function and had to be replaced.
    On the new hard drive I have a version of VWDX 2010 that was downloaded yesterday (May 28, 2014). As indicated above, I also installed SP1 and related updates.
    When I load a project that was created in the version of VWDX 2010 that was installed almost two years ago and try to open the database connection, I get, in essence, the following error message:
    "The database C:\Users\...\Database.mdf cannot be opened, because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported."
    So it seems that the original database version was 661, whereas the version downloaded yesterday is 655. It seems very strange that a version downloaded now should be earlier than a version downloaded two years ago. Does anyone have an explanation or a solution?
    Thank you all for your trouble, and best regards.
    Eric (orexin)
    P.S. The site from which I obtained VWDX yesterday was:
    www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express and the executive was called VWD2010SP1AzurePack.exe.

  • Content Search Web Part not work for Office Web Apps

    Hi ,
    In Content Search Web Part word documents are not able to open in browser,but in document library  its working.
    Office Web Apps not work in Content search web part
    Please help me
    Regards
    Sachin

    Below is the display template to open the document in OWA.
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>AdSpace Picture on top, 3 lines on bottom</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;Picture URL&#39;{Picture URL}:&#39;PublishingImage;PictureURL;PictureThumbnailURL&#39;,&#39;Link URL&#39;{Link URL}:&#39;Path&#39;,&#39;Line 1&#39;{Line
    1}:&#39;Title&#39;,&#39;Line 2&#39;{Line 2}:&#39;Description&#39;,&#39;Line 3&#39;{Line 3}:&#39;&#39;,&#39;FileExtension&#39;,&#39;SecondaryFileExtension&#39;,&#39;ContentTypeId&#39;,&#39;ServerRedirectedURL&#39;</mso:ManagedPropertyMapping>
    <mso:MasterPageDescription msdt:dt="string">This Item Display Template will show a 304x100 picture of the item on top. The title and the default item description will display to the bottom of the picture with an additional line that is available
    for a custom managed property.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:_dlc_DocId msdt:dt="string">ZRMVMDDDEAE7-1-215</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">583b0835-32ff-4d1c-983f-b6ff4a0ef956</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://sp2013-dev-6:7000/sites/adspace/_layouts/15/DocIdRedir.aspx?ID=ZRMVMDDDEAE7-1-215, ZRMVMDDDEAE7-1-215</mso:_dlc_DocIdUrl>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://sp2013-dev-6:7000/sites/adspace/_catalogs/masterpage/Display Templates/Content Web Parts/Item_PictureOnTop.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
        <!--
                Warning: Do not try to add HTML to this section. Only the contents of the first <div>
                inside the <body> tag will be used while executing Display Template code. Any HTML that
                you add to this section will NOT become part of your Display Template.
        -->
        <script>
            $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
        </script>
        <!--
            Use the div below to author your Display Template. Here are some things to keep in mind:
            * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
            inside a comment.
            * Use the values assigned to your variables using an "underscore pound equals"
            (_#= ... =#_) token.
        -->
        <div id="Item_PictureOnTop">
    <!--#_
    var useWACUrl = !$isEmptyString(ctx.CurrentItem.ServerRedirectedURL);
            if(ctx.ScriptApplicationManager && ctx.ScriptApplicationManager.states){
                useWACUrl = (useWACUrl && !ctx.ScriptApplicationManager.states.openDocumentsInClient);
            var appAttribs = "";
            if(!useWACUrl)
                if (!$isEmptyString(ctx.CurrentItem.csr_OpenApp)) { appAttribs += "openApp=\"" + $htmlEncode(ctx.CurrentItem.csr_OpenApp) + "\"" }; 
                if (!$isEmptyString(ctx.CurrentItem.csr_OpenControl)) { appAttribs += " openControl=\"" + $htmlEncode(ctx.CurrentItem.csr_OpenControl) + "\"" };
            var url = ctx.CurrentItem.csr_Path;
         if($isEmptyString(url)){
                if(useWACUrl)
                    url = ctx.CurrentItem.ServerRedirectedURL;
                } else {
                    url = ctx.CurrentItem.Path;
    var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_pictureOnTop_");
    var linkURL = $getItemValue(ctx, "Link URL");
    linkURL.overrideValueRenderer($urlHtmlEncode);
     var iconURL = Srch.ContentBySearch.getIconSourceFromItem(ctx.CurrentItem);
    var line1 = $getItemValue(ctx, "Line 1");
    var setLineHeightRenderer = function(valueInfoObj)
        if(!$isNull(valueInfoObj) && !valueInfoObj.isEmpty)
            if(!$isNull(valueInfoObj.defaultValueRenderer))
                return valueInfoObj.defaultValueRenderer(valueInfoObj);
            else
                return valueInfoObj.toString();
        else
            return "&nbsp;";
    var line2 = $getItemValue(ctx, "Line 2");
    line2.overrideValueRenderer(setLineHeightRenderer);
    var line3 = $getItemValue(ctx, "Line 3");
    line3.overrideValueRenderer(setLineHeightRenderer);
    var pictureURL = $getItemValue(ctx, "Picture URL");
    var pictureId = encodedId + "picture";
    var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 304, 100, ctx.CurrentItem, "cbs-pictureOnTopImg", line1, pictureId);
    var containerId = encodedId + "container";
    var pictureLinkId = encodedId + "pictureLink";
    var pictureContainerId = encodedId + "pictureContainer";
    var dataContainerId = encodedId + "dataContainer";
    var line1LinkId = encodedId + "line1Link";
    var line1Id = encodedId + "line1";
    var line2Id = encodedId + "line2";
    var line3Id = encodedId + "line3";
     _#-->
            <div class="top-content-box" id="_#= containerId =#_" data-displaytemplate="ItemPictureOnTop">
                <div class="top-content-img" id="_#= pictureContainerId =#_">
                    <a class="cbs-pictureImgLink" href="_#= $urlHtmlEncode(url) =#_" title="_#= $htmlEncode(line1) =#_" target="_blank" id="_#= pictureLinkId =#_">
                        _#= pictureMarkup =#_
                    </a>
                </div>
                    <h3 id="_#= line1Id =#_"><a class="cbs-pictureOnTopLine1Link" target="_blank" href="_#= $urlHtmlEncode(url) =#_" title="_#= $htmlEncode(line1) =#_"
    id="_#= line1LinkId =#_"> _#= line1 =#_ </a></h3>      
                    <span class="content-date" title="_#= $htmlEncode(line2) =#_" id="_#= line2Id =#_"><img class="cbs-Thumbnail" src="_#= $urlHtmlEncode(iconURL) =#_"
    alt="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureId =#_" />_#=line2=#_</span>                
            </div>
        </div>
    </body>
    </html>
    Basically,ctx.CurrentItem.ServerRedirectedURL is calculated by a managed property ServerRedirectedURL which needs to be included in the display template.
    Problem solved.
    Nehal Bhandari,ATL, Nagarro Softwares

  • After updating my iPhone 4 to iOS7, the controls on the headset are not working anymore. However, the controls are working on my friend's iPhone 5. Is this a common issue?

    After updating my iPhone 4 to iOS7, the controls on the headset are not working anymore. However, the controls are working on my friend's iPhone 5. Is this a common issue?

    ofel wrote:
    After updating my iPhone 4 to iOS7, the controls on the headset are not working ..
    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...

  • Title & Menu Buttons not working correctly on remote control/ set top player but work in preview.

    Title & Menu Buttons not working correctly on remote control/ set top player but work in encore preview. This only happens for a Blu ray project. When a user presses the menu button it should go to the previous menu they were on but it goes to the main menu. When they press the title button they should go to the main menu but it doesn't do anything. My DVD projects work as expected.I've tried creating a new "test" project with different footage and still get the same undesirable results.
    Overrides grayed out and set to "not set" for timelines and menus.Project settings and build are set to blu ray. Also I've noticed when I preview a Bluray project the preview window shows a red colored disc next to the Title button when viewing the timelines and green when playing the menus but not so for a DVD project it displays red if motion menus and or timelines are not rendered/encoded. I'm not using motion menus and all the media is encoded according to the project specs.
    I've searched this forum but couldn't find the answer. Any help or redirects to a solution would be appreciated. Working with CS5. Thanks.

    I found out on my Samsung Blu ray player the remote has a tools button on it that brings up audio, angle, chapter selection etc.and also title selection which is actually the menus and the timelines unfortunately. It's not as easy or direct as last menu selected but it's a workaround at least. I also plan on using a pop up menu. I'll let you know.

  • Web links not working in iPhone calendar notes. Used to work. Ideas?

    Web links not working in iPhone calendar notes. Used to work. Ideas?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Has any of this been tried?

  • Fast dial (visual bookmarks) does not work with the new 5.0 upgrade. How do I correct this issue

    fast dial (visual bookmarks) does not work with the new 5.0 upgrade. How do I correct this issue Asked this question yesterday. I desperately need info, will I ever be able to use fast dial again?

    I tried it and it WORKED....I even tried the other version BEFORE this one and it didn't work so I tried yours and it worked like a charm so THANKS brother....

  • Parental Controls are not working correctly.  Websites I've listed under Allow Access are still blocked.  How can I fix this?

    Parental Controls are not working correctly.  There are websites I've listed under Allow Access, however they are still blocked. - such as:  Yahoo mail and USAA banking.  How can I fix this?

    Hendry
    Just thought I'd let you know.  Our suspicions were correct, it was the OS. After I installed Snow Leopard (10.6.8) all the problems were corrected.  I also updated the RAM from 1 gb to 6 gb. The mac is working all around better. Sorry it took so long to get back to everyone. My superdrive had pooped out. Rather than replace it I got an external drive from OWC connected with firewire 800.  So far everything is running very well, as far as I can tell this external drive is better than the original superdrive. My superdrive has always acted funny, infact I returned the first mac I got after a week because its superdrive was also malfunctioning. Anyway, all that to say everything seems to be fully functioning again.
    Roy
    Re: Function keys are not working correctly 

  • How does one install a express sql server to run with Visual Web Developer 2008?

    I successfully installed .NET framework v 3.5 and VWD 2008 on a new Vista laptop. When I want to add a Sql Server database to a website, errors tell me to install SS 2005 Express. MSDN SS 2005 Express download tells me I MUST  first install .NET framework v 2.0 before SS 2005. When I try to install framework v 2.0, I'm sent to v. 3.5 and no way to download SS 2005.
    How does one install a express sql server to run with Visual Web Developer 2008?   

    Momark,
    Do you still need help with this?
    Thank you!
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • "no serializer is registered..." error with a web service not working

    I'm using JDeveloper 10.1.3
    EJB 3.0
    I'm having issues with the web service not working after I create a client for it. The web service works fine up until I generate the proxy on the other side.
    ERROR An error occurred for port: {http://buslogic/}MyWebService1SoapHttpPort: no serializer is registered for (class buslogic.runtime.....
    I saved the file before I added the proxy and the wsdl looks the same between the working one and the non working one. I can not pin point the when the change to the web service is occuring. It seemed to work once all the way up until I had a ADF page trying to retrieve data, another time it failed when the proxy was created.
    I can get the version that I saved to work immediately after the version that does not fails.
    Any help would be greatly appreciated,
    Dan

    I'm using JDeveloper 10.1.3
    EJB 3.0
    I'm having issues with the web service not working after I create a client for it. The web service works fine up until I generate the proxy on the other side.
    ERROR An error occurred for port: {http://buslogic/}MyWebService1SoapHttpPort: no serializer is registered for (class buslogic.runtime.....
    I saved the file before I added the proxy and the wsdl looks the same between the working one and the non working one. I can not pin point the when the change to the web service is occuring. It seemed to work once all the way up until I had a ADF page trying to retrieve data, another time it failed when the proxy was created.
    I can get the version that I saved to work immediately after the version that does not fails.
    Any help would be greatly appreciated,
    Dan

  • The download of icloud control  panel v2.0 does not work. I have no box to check for calendar and contaks. Whats wrong?

    The download of icloud control panel v2.0 does not work. I habe no box to check for calendar and contacts. Whats wrong?
    Thanks Chris

    Hi, I came across the same problem and was not able to open any iCloud folders on Outlook, and iCloud was continusly asking to repair the iCloud Control Panel. Got the issue fixed by following the steps on the link http://somanytips.com/fix-icloud-error-repair-the-icloud-control-panel-to-use-ic loud-with-outlook/

  • Flash player download web site not working

    After uninstalling flash player, I can't get the web site to reinstall it. I go to the web site click the agree and install now and gos to the next page but nothing pops up like it said it should.
    http://get.adobe.com/flashplayer/thankyou/activex/?installer=Flash_Player_10_for_Windows_I nternet_Explorer&i=McAfee_Security_Scan_Plus&d=Google_Toolbar_6.3

    Hi eidnolb,
    My OS is windows 7 Ultimate. There no Service packs listed Microsoft don't have one for it yet. My brower is Internet explorer 8 version: 8.0.7600.16385. My firewall is not causeing problems and the popup blocker didn't even activate.
    Date: Wed, 14 Apr 2010 10:01:33 -0600
    Subject: Flash Player flash player download web site not working
    Hi newcomer76, Please post back your operating system and if any applicable Service Packs, any and all browsers that you use with the versions.
    With that information, I'll be able to give you instructions and the links you need.
    Thanks,
    eidnolb
    >

  • Audio volume control in quick start bar not working after last HP update

    Volume keys at top work fine but clicking cursor on quick start icon for volume control does nothing now.

    Hi  ,
    Thank you for visiting the HP Forums! A great place where you can find solutions for your issues with help from the community!
    I came across your post about the Notebook, and wanted to assist you! I have looked into your issue about your HP ENVY 17 Notebook and issues with the Audio after Windows 10 update. Here is a link to the HP Support Assistant if you need it. Just download and run the application and it will help with the software and drivers on your system that might need updating. Restart the Notebook after updates have been done. If your computer is having problems finding and installing operating system updates, try using the Windows Update Troubleshooting tool to fix the problem. Here is a document that shows how to update drivers that are not working correctly with Windows 10. I hope this helps you. Thanks.

Maybe you are looking for

  • Ipod not being recognized by comp or itunes.

    its not being recognize and the prob is not the usb port itself(flashdrives, cameras,ect will work) the comp is a dell and when i do connect it just charges and stuff no actually activity with the comp

  • Hyper-V on Windows 8.1 64 bit, "Could not send keys to the virtual machine"

    Hi, I newly installed Windows 8.1 (not an upgrade, fresh install from corporate network) on a Dell Precision T7600 workstation and enabled the Hyper-V feature with the matching management. I created a couple of 2 GB RAM, 2 virtual CPUs VMs and am try

  • Warehouse In stock

    hi all, Why in stock of a item shows sum of stock of all warehouse's eventhough there is a negative stock in specific warehouse on all documents ? Above issue gets corrected in latest patch or in 2007B patch levels ? We are using SAP B1 2005B PL36. J

  • Clamshell will not start up.

    Hi, I've got iBook recently and had a careful look at it. The hardware seems to be in working order as no sign of moisture or other kinds of damage. Thats what it can do: when power lead pluged in green light shows power and shortly turns to orange t

  • Reducing file sizes with symbols when it's already too late

    Is it possible to turn something into a symbol when you have already placed it multiple times on the artboard? I have created very complex artwork that my client is very happy with, but I haven't shown her the file sizes! Ultimately this has to be up