Web part not doing anything on selected index change.

My code is below. I tried to remote debug but when I do the breakpoint will not be hit.  No symbols have been loaded for this document.  When I bring up the modules my dll doesn't appear in there.  If anyone can see anything wrong with my
code please advise
using System;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Windows.Forms;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
namespace PurchasingPortal.Vendor.DropDown
    [ToolboxItemAttribute(false)]
    public class DropDown : WebPart
        String drpListSelected = "";
        DropDownList drpList = new DropDownList();
        protected override void CreateChildControls()
            SPSite site = SPContext.Current.Site;
            SPWeb web = SPContext.Current.Web;
            SPQuery query = new SPQuery();
            SPList list1 = web.Lists.TryGetList("Vendor");
            if (list1 != null)
                DataTable dtvendor = new DataTable();
                dtvendor = list1.GetItems(query).GetDataTable();
                drpList.DataSource = dtvendor;
                drpList.DataTextField = "Title";
                drpList.DataValueField = "ID";
                drpList.DataBind();
                Controls.Add(drpList);
              //  drpList.SelectedIndexChanged += new EventHandler(this.ddlAllLists_SelectedIndexChanged);
                drpList.SelectedIndexChanged += new EventHandler(drpList_SelectedIndexChanged);
      //  void ddlAllLists_SelectedIndexChanged(object sender, EventArgs e)
        void drpList_SelectedIndexChanged(object sender, EventArgs e)
            try
                //set the selected value and logic
                drpListSelected = drpList.SelectedValue;
                global::System.Windows.Forms.MessageBox.Show(drpListSelected);
                this.Page.Response.Redirect("http://drive.penskeautomotive.com/corporateservices/purchasing/Lists/Vendor/DispFormVendor.aspx?iD="
+ drpListSelected);
            catch (Exception ex)
                //  LogManger.WriteLog(" Error in EventCalendarWebPart.cs ddlAllLists_SelectedIndexChanged()" + ex.ToString());
                Console.WriteLine(" Error in DropDown.cs ddlAllLists_SelectedIndexChanged()" + ex.ToString());
        protected override void Render(HtmlTextWriter output)
            EnsureChildControls();
            base.RenderContents(output);

your code is missing
drpList.AutoPostBack = true;

Similar Messages

  • Using "View Selector" in the List View Web Part, changes the web part page to the view selected's page.

    Hi,
    I am relatively new to Web Parts pages.  I created a page with list view web part and a Infopath Form Web Part, which are connect via the "Get Form From" option.  My users would like to be able to use views dependent on what
    they are looking for.  So I created different views.  However, when I select the view from within the Web Part, it changes the web part page to the list view page.  I must be doing something wrong.  How do I configure the list view to show
    the selected view and results within the existing "list view web part"?
    Thanks,
    Dwayne

    Hi
    Lindali,
    Sorry, but this has not been answered to my liking.  The "List View Web Part" has the ability for the user to select the view from within the web part, so there you should be able to select a different view and have it appear within the same web part. 
    Does anyone know how to complete this task?
    Thanks,
    Dwayen

  • Cannot create mysites from powershell: Original XSLT List View Web Part not found

    I have a bizarre problem in my SharePoint 2013 farm. This does not occur in my test farm, only in the farm we were going to go live with.
    I'm on windows Server 2012, SQLServer 2012 SP1, SharePoint 2013 April CU. 1 appserver/centraladmin server, 2 web servers.
    When I log into our mysitehost and click newsfeed, it will create a mysite (even though first it displays "we are sorry there was a problem creating your site")
    But from powershell, whether I use $UserProfile.CreatePersonalSite() or New-SPSite, I get the following error:
    Original XSLT List View Web Part not found
    So far I've only found one other person with this:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2503e42c-e114-4e89-8e00-89fe70f0b154/cannot-create-sharepoint-mysite-programmatically
    This is a brand new farm, created with the same scripts I created my test farm with, and same version of SharePoint. Only the service accounts are different. (Farm account has admin on the servers right now since I was setting up profile service).
    Some other errors from the same correlation ID that look related:
    It can't seem to find the listemplate 101
    And something looks wrong with the MySiteDocumentLibrary feature
    I have tried the following:
    1. run psconfig.exe on each server
    2. install-spfeature -AllExistingFeatures
    3. looped through the directory under Features and for each called Install-SPFeature $dirname -Force
    4. uninstalled and reinstalled MySiteDocumentLibrary feature
    5. blew away the whole farm (removed all servers from farm, deleted all databases) and recreated it.
    6. tried creating the UPA from the CentralAdmin gui.
    The only real difference I can think of between the working farm and non working farm is, I installed the working farm using RTM, then as they came out added the March PU and April CU. For this farm I installed RTM and March and April, and then ran my build
    farm script.
    I am at a loss. What do I need to do, re-install the binaries? That's all I can think of. What I love is that our test / POC system worked fine, and now 2 weeks before go-live I'm seeing errors on the production servers I've never seen before. Using the
    same scripts no less.
    Feature Activation: Feature 'Fields' (ID: 'ca7bd552-10b1-4563-85b9-5ed1d39c962a') was activated
    Feature Activation: Feature 'CTypes' (ID: '695b6570-a48b-4a8e-8ea5-26ea7fc1d162') was activated
    No document templates uploaded for list "$Resources:core,global_onet_solutiongallery_list;" -- none found for list template "100"
    Failed to find <ListTemplate> tag corresponding to ID "101", tried both onet.xml for site definition ID "0" language "1033" and global site definition. Operation failed.
    No document templates uploaded for list "$Resources:core,stylelibraryList;" -- none found for list template "121".
    System.Runtime.InteropServices.COMException: A user may not remove his or her own account from a site collection.<nativehr>0x81020051</nativehr><nativestack></nativestack>, StackTrace: at Microsoft.SharePoint.SPUserCollection.UpdateMembers
    Feature Activation: Feature 'MySitePersonalSite' (ID: 'f661430e-c155-438e-a7c6-c68648f1b119') was activated
    Feature Activation: Activating Feature 'MySiteDocumentLibrary'
    Calling 'FeatureActivated' method of SPFeatureReceiver for Feature 'MySiteDocumentLibrary'
    SharePoint Foundation Upgrade MySiteDocumentLibraryFeatureReceiveraj08n INFO Creating new My Documents library
    Unknown SPRequest error occurred. More information: 0x80070002
    SPRequest.GetMetadataForUrl: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://contoso/personal/cbuchholz/DOCUMENTS ,METADATAFLAGS=59
    System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>, StackTrace: at Microsoft.SharePoint.SPWeb.GetObjectForUrl at Microsoft.SharePoint.Portal.UserProfiles.MySiteDocumentLibraryUtil.GetSPObjectFromUrl ...
    <nativehr>0x80070002</nativehr><nativestack></nativestack>There is no Web named "/personal/cbuchholz/DOCUMENTS"
    Possible mismatch between the reported error with code = 0x81070504 and message: "There is no Web named "/personal/cbuchholz/DOCUMENTS"." and the returned error with code 0x80070002.
    Attemping to add webpart id 0F6072F2-E804-4CFD-837E-BB37332B9D1C to web http://contoso/personal/cbuchholz
    Adding XsltListViewWebPart calling SPRequest::CreateListViewPart. Web part id 0F6072F2-E804-4CFD-837E-BB37332B9D1C, web http://contoso/personal/cbuchholz
    Feature receiver assembly 'Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c', class 'Microsoft.SharePoint.Portal.UserProfiles.MySiteDocumentLibraryFeatureReceiver', method 'FeatureActivated' for feature 'e9c0ff81-d821-4771-8b4c-246aa7e5e9eb' threw an exception: System.InvalidOperationException: Original XSLT List View Web Part not found at Microsoft.SharePoint.Portal.UserProfiles.MySiteDocumentLibraryUtil.ReplaceListViewWebPart
    Feature Activation: Threw an exception, attempting to roll back. Feature 'MySiteDocumentLibrary'
    Exception in EnsureFeaturesActivatedAtSite: System.InvalidOperationException: Original XSLT List View Web Part not found
    Failed to activate site-collection-scoped features for template 'SPSPERS#2' in site collection 'http://contoso/personal/cbuchholz'
    Failed to apply template "SPSPERS#2" to web at URL "http://contoso/personal/cbuchholz
    I've had other problems in this farm: the bug where when you add Administrators to a Search Service via the Manage Service Applications page, it removes the SPSearchDBAdmin role from the search service process account. That one did not happen in the other farm.
    At least other people have that one and I could just use the farm admin instead (still troublng of course).

    Ok,
    Here is the problem:
    When creating a mysite from powershell or script, apparently you can ONLY do this from a wfe (or a server running Microsoft SharePoint Foundation Web Application in services on server).
    You CANNOT create mysites from script on your appserver if it is not also a Web Application Server. I confirmed the same is true in my test farm. I guess I was always running most of these scripts on the webserver.
    I searched all over and cannot find this documented anywhere.
    Who do I contact to have Microsoft document this?
    It's Thursday morning, I've been working non stop since Saturday morning so you don't have to :)

  • After I tried to update my Ipad mini, it kept saying hello in different languages on my lock screen and then when I slide across, it says connected to itunes but it's not doing anything!! Please help!!! And by the way it's plugged into the laptop to itune

    After I tried to update my Ipad mini to the newest update, it kept saying hello on my lock screen in different languages and then when I slide the screen across, it says connected to itunes but it's not doing anything!! By the way my Ipad mini is plugged into my computer and connected to itunes!! Please help me!!

    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.

  • SQL Report Viewer Web Part Not displaying Report

    I have just completed updating an old report using report builder 3.0. I have added it to SharePoint Designer but have not replaced the old report file. 
    Any help is greatly appreciated!!
    All I did was export the old report from sharepoint designer to my desktop. Then opened it with Report Builder 3.0- made changes to the report and saved it with a different name (for safety in case i break things) and then upload it back to the same place where
    the old report was located using SP Designer. I then went back to the site in sharepoint that is displaying the old report, and changed the URL path in the SQL report viewer to the new report. 
    Now the SQL Report Viewer web part isn't showing anything (blank)

    Dear Form Moderator,
    This question is already asked in sharepoint forum so please don't move this sharepoint forum. Here is link of thread:
    https://social.technet.microsoft.com/Forums/en-US/3796da85-fbb4-4722-a5d0-724859f7d4ae/sql-report-viewer-web-part-not-displaying-report?forum=sharepointgeneralprevious
    Here is the one more duplicate thread link in same forum. So either you can merge both OR delete one.
    https://social.technet.microsoft.com/Forums/en-US/259d2586-ed4a-4f47-a808-877d4621d9f2/report-builder-30-sql-report-viewer-web-part-not-displaying-report-in-sharepoint?forum=sqlreportingservices
    [SharePoint Forum Moderator]
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • I came home and i came home and my iphone is now frozzen on the applmy iphone is now frozzen on the apple screen and it hasnt been doing anything i put it in the charger and its not doing anything how do i get it to work so i can  text and call and stuff

    i came home and my iphone is now frozzen on the apple screen and it hasnt been doing anything i put it in the charger and its not doing anything how do i get it to work so i can  text and call and stuff

    I got to that page but clicking on the Subscribe Free had no effect.
    Nothing showed in the Podcasts nor the iTunes U.
    In fact I also subscribed to Stanford's lectures and despite actually managing to DL them there is still no subscription in iTunes U, just the Intro to Computer Science belatedly.
    Peter
    I'd like to attach the screen grab of the out of order and randomly DLed selection of Harvard's course, but the forum won't let me attach it even though it is only 456k. Correction, close post and retry and now it lets me. NB how intermittent the DLs are and in no particular order.

  • Web Part Not Re-sizing Based on Width Property

    I have a SP 2010 publishing site with a custom master page, using the Body Only page layout.  I inserted a discussion board web part in the page content section of the page.  When I go into the standard web part properties and try to set an absolute
    width (in pixels), the web part itself does not squeeze down to this size.  Instead, the web part content stays the same size, and some other div involved gets the width applied and covers up the web part content (sounds confusing, see image below for
    example).  
    I tried this on a site with no master page and a web part zone, and it the web part content itself resized, which is what I was hoping to see above.  Has anyone else seen this behavior?  Does the web part need to be in an actual web part zone in
    order to resize?  Or is this all just a problem with my custom master/styles?  I suspect it may be the latter, but I'm not sure how much control I have to fix it.  Anyway, any thoughts would be greatly appreciated.  Image samples below
    to illustrate the issue.
    IMAGE 1: See how "Last Updated" is cut off at the end?  This was set to 600 pixels.  The web part content doesn't resize.
    IMAGE 2: This was set to 500 pixels in a traditional web part zone on a page with no custom master.  The content resizes as expected.

    I would use the Internet Explorer Developer tools to inspect the page and the styles being applied to the webpart. That will give you a clear understanding of what styles are being applied to your webpart (and the HTML that the webpart renders). 
    You can then use an HTML Form webpart (or attach a stylesheet) to apply CSS styles to override the width property and any other styles that require changing, in order to get the webpart to display correctly for your given width.
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • I just got a new docking system so i plugged it in and put in my ipod, then straight away my screen went white and now its not doing anything! please help!!

    ! just got a new docking system so i plugged it in to my computer because it wasnt the wall charge type, so I put in my ipod, then straight away my screen went white and now its not doing anything! i press the home and lock button nothing happens... then i plug it in my computer it doesnt come up in itunes or even the copmuter. please help i can not live with out my ipod!

    Your post is abit confusing, especially on getting those weird messages and emails,( assumed in your Windows machine.)
    Most likely you have Restored the iPod using the new Macbook pro, using the same name as that in your Windows machine, hence the duplicate name warning, as it is trying to sync Automatically.
    If you are syncing your iPod to both the Mac and Windows, you must set it to Manually Manage Music, in the first machine that you setup iTunes with the iPod. Read thsi Apple Support Article
    In iTunes, Preference, tick on Prevent devices syncing automatically
    Hopefully your music are still in both your iTunes library,
    Connect the iPod to the Mac
    Restore it (just to fix any filesystem corruption by the Windows end)
    Set it to Manually Manage Music
    Sync your selected songs in your library.
    Whern sync complete, Eject it
    Connect it to your Windows PC.
    Select the song in the library
    Sync it.
    It should work if your ipod Hardisk is not giving any problem.
    Good luck!

  • Does iDVD work with Maverick? This is the first time I tried to burn a DVD using iDVD after upgrading to Maverick. It seems to get stuck at encoding menu stage and not doing anything.

    I tried to burn a DVD using iDVD after upgrading to Maverick, first time I tried after upgrading to Maverick a few weeks ago. It seems to get stuck at encoding menu stage and not doing anything. Does anyone else have the same problem?

    I did not have a DVD handy to burn but I have just created a small 2 minute video and created a Disk Image and also a VIDEO_TS folder, the encoding worked correctly, so it works with some items.
    You may get a better responce in the iDVD forum.
    https://discussions.apple.com/community/ilife/idvd
    regards

  • Redirect rule not doing anything

    Note that the email account the the follwing applies to is a gmail account
    I have a rule in Mail that sends all emails from Macworld, Mac-Forums, and MacWeek to a folder (OK, a label in gmail parlance) and flags it "green" (so I can find them easliy and read them later).  Problem is the rule is not doing anything.  Ideas?

    Doesn't work for three days, but as soon as I post a message it starts working.  #sigh
    Actually, restarting the Mail program seemed to fix it.

  • Trying to delete pages 21-24 on iPhoto book but "remove pages" option grayed out and pressing delete button not doing anything.  Help!

    Trying to delete pages 21-24 on iPhoto book but "remove pages" option grayed out and pressing delete button not doing anything.  These extra pages resulted from using Autoflow and now we can't seem to get rid of them.  Help!

    Good morning Old Toad.
    I did as you suggested:
    1) Booted from install CD.
    2) Ran Disk Utilities on internal hard drive--no repairs necessary. For good measure, did the same thing on external drive. Also no repairs necessary.
    3) Checked software update--no updates found. About this Mac said I was already running 10.4.7. For good measure, I downloaded the latest and installed it. Since it let me run the install, I'm not sure if I installed something new or reinstalled what I already had.
    4) I rebooted from CD, ran disk utilities, ran repair disk--no repairs necessary. Repaired permissions and a lot of permissions repaired.
    5) Tried to delete the files and the same old thing happened: kernel panic. The specific message:
    panic(cpu 0 caller 0x00102A08): jnl: transaction too big (1587712 >= 1572352 bytes, bufsize 8192, tr 0x29f1fb0 bp 0x2801de40)
    So there's no change in my status.
    I'm trying to delete the files because:
    A) They already take .5 Gb.
    B) I can't get rid of them ever. If I move the problem files to a different folder, I can only do one successful drag-and-drop backup to the external drive until the "new" thumb segments become unerasable just like the previous versions and crash the system.
    C) I can't even "just" drag and drop every file/folder except the thumbs, because that ends up crashing the system as well. So I have to drag and drop every file/folder in the iPhoto hierarchy individually. Which makes me less inclined to backup, which defeats the purpose of a backup.
    D) After the iPhoto fiasco I'm just crabby about all the Apple screw-ups I'm experiencing and I want to get them fixed.
    Thanks for your help. Any additional suggestions would be appreciated.
    G4   Mac OS X (10.4.6)  

  • HT203548 I'm having problems with Siri on my iPhone 6.  It worked briefly yesterday and now its not doing anything.  I have turned phone off and on and made sure everything is on in settings.  Please help!

    I'm having problems with Siri on my iPhone 6.  It worked briefly yesterday and now its not doing anything.  I have turned phone off and on and made sure everything is on in settings.  Please help!

    Do you have an active data connection (wifi or cellular)? Have you tried resetting the phone by pressing and holding the Home and power buttons until the apple appears (this is different than just turning it off and back on).

  • I lost my contacts on my 3gs and was not doing anything with the phone.. it was plugged into the wall charging

    I lost my contacts on my 3gs and was not doing anything with the phone.. it was plugged into the wall charging... can anyone help??

    cannect it to a computer and let it sync through iTunes. Contacts are a broad problem. You need to state where your contacts are located i.e. do you use yahoo mail? do you sync to iCloud? there are alot of answers for you problem but you need to be a little more detailed

  • HT4623 I updated my iphone to the new version and now it tells me to connect to itunes  which I did and it's not doing anything else, what do I need to do?

    I updated my iphone to the new version and now it tells me to connect to itunes  which I did and it's not doing anything else, what do I need to do?

    Try to connect in recovery mode, explained in this article:
    iOS: Unable to update or restore

  • My network symbol keeps working on my home page even when I'm not doing anything, I know there has been problems in the past with this so has it come back, help it's killing my battery!

    My network symbol keeps working on my home page even when I'm not doing anything, I know there has been problems in the past with this so has it come back, help it's killing my battery!

    Close all open apps by double-tapping the home button, then swiping up and off the screen with the app window (not the smaller icon).
    Reset your device: hold down the home button along with the sleep/wake button until the screen goes black and you see the Apple, then let go. (No data loss)

Maybe you are looking for

  • I have updated to Keynote 6.1, but I still have 5.3 and I cannot open the file I just created in 6.1.

    I have updated to Keynote 6.1, my App Store says I did it 2/1/14, I just created a new slideshow in 6.1 tonight, saved it all the way through while creating it, and when finished, saved it one more time, and closed the file. I treid to open it again,

  • Close dialog with a click outside it

    How can I close a JDialog when the user clicks elsewhere? If it is modal, no mouse events are generated. With a non-modal dialog, I couldn't use FocusListener, the dialog looses focus just after it is made visible. MouseListener didn't worked too, a

  • X-Fi and Asus A8R-

    I have the X-Fi music in an Asus A8R-MVP, and I'm getting the same issues as the NForce4 crowd with the ha20x2k.sys error when installing the drivers. Oddly enough the sound card was working before, only the odd BSOD, but I did what that other thread

  • FI  Substitutions with Pre requisites

    Hi Experts, I want to mention as a pre requisite that my substitution exit should work for a given Range of company Codes (Bseg-Bukrs) Do i need to create a set directory or what are the steps involved? Please tell me. Thanks Dany

  • CSS Vip

    I have worked with cisco on this and so far nothing. I have a vip that i cannot communicate over port 80, all configs are good according to cisco. if i telnet to one of the 2 servers behind on port 80 they work fine, If i telnet to the vip on 80 it a