When I click on a save button on my custom dialog it opens up the same window

Last post 03-06-2008, 7:54 PM by hamid_gsts. 4 replies.
Sort Posts: Previous Next
  •  03-06-2008, 6:45 PM 37665

    When I click on a save button on my custom dialog it opens up the same window

    Hi! I put a custom button the tool bar and when I click it, my aspx dialog window opens up, but when I click on the save button in aspx, another popup window opens up (same aspx), when I click on the save button in the last open window, it works (no more popups), it's just doing it the first time. Thanks!
  •  03-06-2008, 6:54 PM 37666 in reply to 37665

    Re: When I click on a save button on my custom dialog it opens up the same window

    I had a similar issue and was able to overcome it by adding <base taret="_self"/> to the head tag of the popup form (see below)
     

    <head runat="server">

    <title></title>

    <base target="_self"/>

    </head>
     
    hope that helps
     
     
  •  03-06-2008, 7:25 PM 37668 in reply to 37666

    Re: When I click on a save button on my custom dialog it opens up the same window

    Hi! Thank you! It works now, the only problem is that I have a listbox with image files from the upload folder and I have this code:

    protected void lbxImages_SelectedIndexChanged(object sender, EventArgs e)

    {

    txtSelectedImage.Text = lbxImages.SelectedItem.ToString();

    cmsImage.ImageUrl = txtSelectedImage.Text;

    }

    if I click on the listbox items it does not get displayed in the textbox, nor the image. And I have a button just sitting there for now under the textbox, if I click on that the textbox get the item that was highlighted in the listbox, eventhought the button has no click event. Thanks again
  •  03-06-2008, 7:36 PM 37669 in reply to 37668

    Re: When I click on a save button on my custom dialog it opens up the same window

    how is your listbox declared?  Is it set with autopostback= true?  Is it also set with a value for OnSelectedIndexChanged?
     
    It sounds like you've got an event handler issue.  Can you set a breakpoint inside the code you posted and hit it?
  •  03-06-2008, 7:54 PM 37671 in reply to 37669

    Re: When I click on a save button on my custom dialog it opens up the same window

    Hi! Thank you! that solved my problem for the listbox. It's not working for the image though. I think it might the path, cos I am pulling all the file from the upload folder and adding them to the listbox with the full path.D:\CMS\WebName\Uploads\pic.jpg, could this be why the image is not showing up?
View as RSS news feed in XML