Hi, I am working on this web application that needs to allow the user to upload files. The problem I am having is that when I upload a file with a pound sign, and try to access it I get an error. For example, the file 'AMS.doc' would upload fine to the server and when I try to download that file when it shows up in my grid, everything will go as expected. However, if I rename the file to 'AM#S.doc' and then upload it, it will get uploaded to the server and the file name will get saved to the database, however, when I click to try to download that file, I get an error message. Is there a way to fix this? I have tried Server.UrlDecode and Encode, as well as HtmlEncode and decode, and none have fixed the issue. Thanks, TheMajorRager
TheMajorRager
Posts
-
File Uploading/Downloading problem. -
[Message Deleted]Hi Michael, I found out the problem actually. I am not sure why this caused the problem in my code, in the divs with the class fieldsetQuestion and then fieldsetPicture, I had them both each at width:50%, I changed them to below 50% and now it doesnt crash anymore. Thanks a lot for your help though!
-
[Message Deleted]Here is my code, with the css, it crashes in IE 6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <script>var page_load_time_start = new Date();</script><script>var serverLoadTimeInfo ='<a title="Start:12/18/2007 8:38:12 AMEnd:12/18/2007 8:38:12 AM" style="cursor:help">0.0<a>';</script><script>var serverLoadTimeForCalc = parseFloat(0.0);</script><script src='/templates/includes/nav_javascript.js'></script><link rel='stylesheet' href='/Templates/master.css' type='text/css' /><script>email='jim.polewaczyk@philips.com';</script><script>IsDelegate = 'false';</script><script>security='0';</script><script>startPageVar='root';</script><script>serverLoad='12/18/2007 8:38:12 AM';</script><script>nav_flag='true';</script><script>xApp=parseInt('244');</script><script>intelliAccess='0';</script><script>cServer='http://localhost';</script><script src='/templates/includes/lib.js' type='text/javascript'></script><script src='/_includes/cookies.js' type='text/javascript'></script><script src='/business/service_metrics/navigation.js'></script><script src='/Templates/includes/site_data.js' type='text/javascript'></script><script type='text/javascript'>_page.startPage(startPageVar)</script> <head id="Head1"><title> SOLAAR </title><link rel="stylesheet" href="css/style.css" type="text/css" /> <script type="text/javascript"> </script> <style type="text/css"> body { font-size: 8pt; max-width:950px; width:950px; } .setWidth { width:100%; } .breadcrumbs { font-size:100%; } .questions { margin-top: 10px; font-size: 100%; width: 950px; max-width:950px; position: relative; height: auto; padding-bottom:5px; border-bottom:solid 1px; } .pageSettings { font-size:100%; } td label { white-space:nowrap; } .lastQuestion { margin-top: 10px; font-size: 100%; width: 950px; max-width:950px; position: relative; height: auto; padding-bottom:5px; } .errorImage { vertical-align:top; width:5%; display:inline; } .whiteBackground { background-color:White; } .silverBackground { background-color:
-
[Message Deleted][Message Deleted]
-
OWC Excel ProblemI am trying to use the OWC11 to edit an Excel template. the code below creates a NEW file instead of just changing the cells. Does anyone know how to make it so that it edits a cell in a file instead of creating a new file? Also, how much memory does OWC11 use on the server? private void EditSpreadSheet() { spread = new OWC.SpreadsheetClass(); spread.ActiveSheet.Cells[1,1] = "HELLO"; spread.get_Range("A2:A2",Type.Missing); spread.Export(Server.MapPath(".") + "\\" + "PR.xls",OWC.SheetExportActionEnum.ssExportActionNone, OWC.SheetExportFormat.ssExportHTML); } Sincerely, The Major Rager
-
OWC Excel ComponentsHi Dave, Here is the new code I came up with however, this creates a NEW file instead of just changing the cells. Do you know how to make it so that it edits a file instead of creating a new one? Also, how much memory does OWC11 use on the server?
private void EditSpreadSheet() { spread = new OWC.SpreadsheetClass(); spread.ActiveSheet.Cells[1,1] = "HELLO"; spread.get_Range("A2:A2",Type.Missing); spread.Export(Server.MapPath(".") + "\\" + "PR.xls",OWC.SheetExportActionEnum.ssExportActionNone, OWC.SheetExportFormat.ssExportHTML); }
Sincerely, The Major Rager -- modified at 17:33 Wednesday 27th June, 2007 -
OWC Excel ComponentsHi, I am trying to use the OWC to edit the cells in an existing excel file. I have done it with Interop.Excel, but that takes up too much memory which is why I am going towards the OWC. My problem is that I cannot seem to figure out how to even open the Excel File for editing. Here is my code of a sample project I am trying to do just to get started:
private void EditSpreadSheet() { spread = new OWC.SpreadsheetClass(); spread.ActiveSheet.ConnectionString = "PR.xls"; spread.Cells[2,"2"] = "Hi"; }
Sincerely, The Major Rager -
Editing a Textbox and CheckBox in Excel file using InteropHi, I am using Interop to gain access and make editions to an excel file and I am able to make it to individual cells. However I cannot seem to figure out how to make changes to an object like a textbox and checkbox programmatically using C# in the Excel file.
-
IIS ProblemHello all, I am having this problem with IIS, where nothing seems to appear as the default website, and when I click to expand the Websites folder, there is nothing under it. Could this be related to a security issue set on my computer? I do not have write access to the Inetpub folder, I only have read. Sincerely, The Major Rager
-
How to get the Site Address from a pageThanks it works!
-
How to get the Site Address from a pageHello Everyone, I am working on this project, and I was wondering if there is a way to get the site address from a page. Lets say we are at www.codeproject.com, is there a way to get codeproject from URL so we know what site address we are at? Sincerely, The Major Rager
-
Problems with ASP.NET 2.0Hello, I am trying to convert this application I am working on from ASP.NET 1.1 to 2.0, and certain things are not working as they should. One thing is the code below
TextBox txtCompleted = new TextBox(); TextBox txtProjected = new TextBox(); position = j+1; CheckBox chk = Page.FindControl("chk_"+ j + "_" + ContractNum) as CheckBox; txtCompleted = Page.FindControl("txtCompleted_"+j+"_"+ContractNum) as TextBox; txtProjected = Page.FindControl("txtProjected_"+j+"_"+ContractNum) as TextBox; completed = txtCompleted.Text.Trim(); projected = txtProjected.Text.Trim(); CheckList_ID = int.Parse(CheckListID.Rows[j]["ID"].ToString());
In .NET 1.1 completed and projected get the values of the text boxes after the user clicks save, but in 2.0 this doesn't seem to work, I was wondering if anyone had any suggestions. Sincerely, The Major Rager -
Using DataBind.Eval in the Code BehindHello Everyone, I am trying to use DataBind.Eval(Container.DataItem, "column") in the code behind but when I type in Container.DataItem, it gives me an error. Does anyone know how to use this instead of using it in the aspx page? Thanks Sincerely, The Major Rager
-
Global.asax problemHi Everyone, I just downloaded an Eval version of Dundas Charting tools and it comes with these Demo projects, however when I try to run the demo projects, for every single one I get this basic error: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'sales.Global'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="sales.Global" %> I tried Building it to fix it and then running it but that did not work for any of them. Please help. Thanks Sincerely, The Major Rager
-
DataBinder outputThanks for your help! Sincerely, The Major Rager
-
DataBinder outputHi Everyone, I am working on this project in ASP.NET and I used this code, and I wanted to to output as currency which SHOULD work, but it won't. <%# DataBinder.Eval(Container.DataItem, "invoicetotal","{0:c}") %> Is there something that I am doing wrong, no commas or dollar signs show up when I use that for some reason. Thanks, The Major Rager
-
Charts and graphs using .NETHi Everyone, I am working on a project where I am going to need to make a few charts and graphs using Excel. I do not have the Office tools for Visual Studio and I was wondering what was the best way to do this. The graphs also should not be just an image, but interactive where I can hover or click one of the bars on the bar graph and it should tell me something. If anyone can give me a few ideas I would truly appreciate it. Thanks
-
DropDownList/ListItem ProblemAnyways, I was able to work around it, I had to basically re-engineer everything I did, and use the second definition using strings instead of ListItems in the DropDownList. Thanks for everything. Sincerely, The Major Rager
-
DropDownList/ListItem ProblemHi George, thanks for replying to me. I did all of that already, they are dynamic, I don't understand why it wont work. Have you tried it both ways, I dont know if it's teh IDE or what. Im using .NET 2003 though.
-
DropDownList/ListItem ProblemI am working on this project, when I add items to a drop down list using a list item it wont into the event handler on selectedindexchanged. However, use the other definition for the dropdown to add in items via a string, it actually goes into the event handler on selected index changed, for example when I do this:
ListItem item = new ListItem("One","1"); DropDownList1 = new DropDownList(); DropDownList1.Items.Add(item);
it will add it in, but when I select something different it wont go into the event handler, but when I do this:DropDownList1 = new DropDownList(); DropDownList1.Items.Add("One");
it will go into the event handler. I dont understand why this is.