Search Results

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

Page 1/1 | 1 

  • Image URL not changing in Update panel

    - by Chiefy
    Ok this is probably really simple but I have been staring at it for too long now. I have an AJAX AsyncFileUpload control that when a file is selected I want the Image next to it to change. I tried it in Javascript and it did nothing, i have since tried it server-side and still nothing. here is the client side. <asp:UpdatePanel runat="server" ID="upnlConfidential"> <ContentTemplate> <td> <asp:AsyncFileUpload ID="_flupCV" runat="server" OnUploadedComplete="AdminFileUpload" /> </td> <td> <asp:Image ID="imgCV" runat="server" Height="25px" Width="25px" ImageUrl="~/Images/Exclamation.png"/> </td> </ContentTemplate> </asp:UpdatePanel> and here is the server side protected void AdminFileUpload(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e) { AjaxControlToolkit.AsyncFileUpload upload = (AjaxControlToolkit.AsyncFileUpload)sender; if (upload.PostedFile != null) { switch (upload.ID) { case "_flupCV": ImageCheckMark(imgCV); break; //etc... } } } private void ImageCheckMark(Image image) { image.Visible = true; image.ImageUrl = "~/Images/CheckMark.png"; } When the server side is called it sets the URL just fine but then nothing happens to the image, when I call the code again the URL is still the previous Exclamation image. its almost like its forgotten. Can anybody help me on this please. Thanks in advance to all who contribute!

    Read the article

  • HTTP Handler error when downloading files - SSL

    - by Chiefy
    Ok big problem as this is affecting two projects on our new server. We have a file that is downloaded by users, the files are downloaded using a HTTPHandler. Since moving the site to the server and setting SSL the downloads have stopped working and we get an error message "Unable to download DownloadDocument.ashx" from site". DownloadDocument.ashx is the handler page that is set in the web.config and the button that goes there is a hyperlink with the id of the document as a querystring. Ive read the article on http://support.microsoft.com/kb/316431 and read a few other requests on this site but nothing seems to be working. This problem only happens in IE and works fine when I run it on the server in http instead of https. public override void HandleRequest(HttpContext context) { Guid guid = new Guid(context.Request.QueryString["ID"]); DataTable dt = Documents.GetDocument(guid); if (dt != null) { context.Response.Cache.SetCacheability(HttpCacheability.Private); context.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", dt.Rows[0]["DocumentName"].ToString())); context.Response.AddHeader("Content-Transfer-Encoding", "binary"); context.Response.AddHeader("Content-Length", ((byte[])dt.Rows[0]["Document"]).Length.ToString()); context.Response.ContentType = string.Format("application/{0}", dt.Rows[0]["Extension"].ToString().Remove(0, 1)); context.Response.Buffer = true; context.Response.BinaryWrite((byte[])dt.Rows[0]["Document"]); context.Response.Flush(); context.Response.End(); } } The above is my current code for the request. Ive used the base handler on http://haacked.com/archive/2005/03/17/AnAbstractBoilerplateHttpHandler.aspx. Any ideas on what this might be and how we can fix it. Thanks in advance for all responses.

    Read the article

  • jquery dialog calls a server side method with button parameters

    - by Chiefy
    Hello all, I have a gridview control with delete asp:ImageButton for each row of the grid. What I would like is for a jquery dialog to pop up when a user clicks the delete button to ask if they are sure they want to delete it. So far I have the dialog coming up just fine, Ive got buttons on that dialog and I can make the buttons call server side methods but its getting the dialog to know the ID of the row that the user has selected and then passing that to the server side code. The button in the page row is currently just an 'a' tag with the id 'dialog_link'. The jquery on the page looks like this: $("button").button(); $("#DeleteButton").click(function () { $.ajax({ type: "POST", url: "ManageUsers.aspx/DeleteUser", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { // Replace the div's content with the page method's return. $("#DeleteButton").text(msg.d); } }); }); // Dialog $('#dialog').dialog({ autoOpen: false, width: 400, modal: true, bgiframe: true }); // Dialog Link $('#dialog_link').click(function () { $('#dialog').dialog('open'); return false; }); The dialog itself is just a set of 'div' tags. Ive thought of lots of different ways of doing this (parameter passing, session variable etc...) but cant figure out how to get any of them working. Any ideas are most welcome As always, thanks in advance to those who contribute.

    Read the article

1