Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Rafferty Uy

@Rafferty Uy
About
Posts
142
Topics
65
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Change master page <body> and <form> attributes from a child page
    R Rafferty Uy

    Hi, Is there a way to change the and

    tags of the master page from a child page? I want to do the following: - Add onload, onclick and onkeypress attributes to the master - Add autocomplete, enctype and action attributes to the master - Change the master method to POST The idea is that the page will redirect to the url specified in the after the submit button is clicked. Thanks and regards,

    Rafferty

    ASP.NET question

  • ASP.Net Webforms - Is there an easy way to know if a validator in a hidden control is failing?
    R Rafferty Uy

    We have an aspx file which contains a lot of custom web controls (ascx files) which has validators in it. Now when I click a button, it doesn't work because some validator is failing. My problem is that there're no errors that appear on the screen, so I suspect that it's one of the controls with .Visible = false. Is there any easy way to know which one is failing? - It's too troublesome to change the code first and set every control to .Visible = true just to test. - Breakpoints doesn't work as well, since validators run on client side. Thanks!

    Rafferty

    Web Development csharp asp-net help question

  • How to trace which hidden control's validator is failing?
    R Rafferty Uy

    Hi Brij! Thanks for the reply. That's a good idea... I think I'll do that for the newer pages. However, I don't have the budget to change the validation group of this page that we're tracing. Do you know of a quick (maybe dirty) way of tracing and knowing which validation control is failing? Thanks again.

    Rafferty

    ASP.NET csharp asp-net design debugging help

  • How to trace which hidden control's validator is failing?
    R Rafferty Uy

    Hi, I have a huge page with around 10 custom controls which are shown/hidden depending on what the user chooses in certain drop-down lists. (Please don't ask why the design is like this). Now each of these controls have ASP.Net validators such as RequiredFieldValidator, CompareValidator, etc. Now I'm having a problem of tracing which validator failed if the parent control is hidden in the page (Visible = false;). Is there an easy way to test this? The only way I can think of is to change the code temporarily and show all the controls all the time just to actually see which one has the problem. But maybe there's a better way. Thanks in advance. Rafferty

    Rafferty

    ASP.NET csharp asp-net design debugging help

  • Free/Open Source Library to Generate Barcodes
    R Rafferty Uy

    Thanks for the reply. I was hoping for a linear barcode generator, our intended barcode scanner will not be able to read 2D

    Rafferty

    C# csharp winforms question

  • Free/Open Source Library to Generate Barcodes
    R Rafferty Uy

    Hi, Can anyone recommend a library that I can use for my winforms .net project to generate barcodes of different types/formats? Thanks in advance.

    Rafferty

    C# csharp winforms question

  • SQL Server 2008: Will the stored procedure be rolled back if the db server gets an error (server crash or performance problem) in the middle of it's operation?
    R Rafferty Uy

    Just the answer I'm looking for! Thanks a lot Eddy! This really helped :)

    Rafferty

    Database database help sql-server sysadmin performance

  • SQL Server 2008: Will the stored procedure be rolled back if the db server gets an error (server crash or performance problem) in the middle of it's operation?
    R Rafferty Uy

    Hi Eddy, thanks for answering. I understand that it's better to wrap both in a single transaction. My question is really what happens if i don't. I want to know the normal behavior of sql server in such a case, not how I can improve the code. I'm investigating a bug and I suspect that this was the cause of the problem... but it seems far fetched because the server didn't crash... it just experienced some performance issues. Thanks again!

    Rafferty

    Database database help sql-server sysadmin performance

  • SQL Server 2008: Will the stored procedure be rolled back if the db server gets an error (server crash or performance problem) in the middle of it's operation?
    R Rafferty Uy

    What do you mean? Currently, these 2 insert statements are not enclosed in try catch blocks, but I didn't think that I need to because the error is caused by something else that is external to this stored procedure. Or is there some DB configuration-wide that I should set?

    Rafferty

    Database database help sql-server sysadmin performance

  • SQL Server 2008: Will the stored procedure be rolled back if the db server gets an error (server crash or performance problem) in the middle of it's operation?
    R Rafferty Uy

    This is for SQL Server 2008: Will the stored procedure be rolled back if the db server gets an error (server crash or performance problem) in the middle of it's operation? This is the idea: - stored proc spTest contains 2 insert statements - exec spTest - spTest executes 1st insert statement - stored procedure still running... but server gets some problem that's unrelated to this stored procedure, which causes the stored proc to stop (e.g. server crash) Will the data in the 1st insert statement be rolled back? Thanks in advance!

    Rafferty

    Database database help sql-server sysadmin performance

  • Download link of the generated file changed when I moved the code to a new pop-up page [modified]
    R Rafferty Uy

    I finally found the solution! I also had to clear the headers of the response, apparently, Response.Clear() only clears the content. Maybe the header was somehow populated incorrectly by the new pop-up page. So the fixed method is:

    public static void Export(Page webPage)
    {
    webPage.Response.ClearHeaders(); //added
    webPage.Response.Clear();
    webPage.Response.Buffer = true;
    webPage.Response.Charset = "";
    webPage.EnableViewState = false;

    string filename = "spreadsheet.xls";
    webPage.Response.ContentType = "application/vnd.ms-excel";
    webPage.Response.ContentEncoding = Encoding.Default;
    webPage.Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName + ";");
    
    string filePath = string.Format("{0}temp\\\\{1}", webPage.Request.PhysicalApplicationPath, fileName);
    populate(filePath);
    
    webPage.Response.TransmitFile(filePath);
    webPage.Response.Flush();
    File.Delete(filePath);
    
    webPage.Response.End();
    

    }

    Thanks to all who wanted to help! :)

    Rafferty

    ASP.NET help javascript com sysadmin question

  • Download link of the generated file changed when I moved the code to a new pop-up page [modified]
    R Rafferty Uy

    Hi, thanks for your reply. I don't think this is the problem because it can properly download the file if I revert back my changes in the server. The old code and the new changes both access from the same file location. this is a big headache

    Rafferty

    ASP.NET help javascript com sysadmin question

  • Download link of the generated file changed when I moved the code to a new pop-up page [modified]
    R Rafferty Uy

    Hi, this will be a bit tricky to explain but I'll try my best. Original page: I have a page with a button, which when clicked will generate a spreadsheet and prompt the user to download this spreadsheet. Changes: Now since we didn't want to the page to refresh, and at the same time we didn't want to implement an UpdatePanel to this page, we changed this button to a link which pops-up a new page. New page: The new page simply contains this button and a javascript link to close the window. I did not change the source code of the generate-spreadsheet method. Generate spreadsheet method:

    public static void Export(Page webPage)
    {
    webPage.Response.Clear();
    webPage.Response.Buffer = true;
    webPage.Response.Charset = "";
    webPage.EnableViewState = false;

    string filename = "spreadsheet.xls";
    webPage.Response.ContentType = "application/vnd.ms-excel";
    webPage.Response.ContentEncoding = Encoding.Default;
    webPage.Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName + ";");
    
    string filePath = string.Format("{0}temp\\\\{1}", webPage.Request.PhysicalApplicationPath, fileName);
    populate(filePath);
    
    webPage.Response.TransmitFile(filePath);
    webPage.Response.Flush();
    File.Delete(filePath);
    
    webPage.Response.End();
    

    }

    Problem: Now here's my problem, the code works perfectly on my local machine, but does not work when I deployed on the server. On my local, it correctly gives me a download dialog with "spreadsheet.xls" displayed. On the server, it gives me a download dialog, but the URL (http://www.oursite.com/WebForms/WFrmExport.aspx) of the pop-up page is displayed instead. So when I click "Save", it will just give me an error. Additional notes: 1. The same export method is used in the original page and the new pop-up page 2. Both original pages and pop-up pages are webforms (*.aspx) 3. The original page works on the server... meaning it correctly prompts me to download "spreadsheet.xls". The problem only occurs on the pop-up page and only on the server. 4. If I remove the File.Delete(filePath); statement, I will see the generated spreadsheet.xls in the correct filepath server directory, which is the same directory used by the original page. What could be the problem?

    Rafferty

    modified on Friday, February 26, 2010 12:40 AM

    ASP.NET help javascript com sysadmin question

  • Error IN asp.net
    R Rafferty Uy

    Sorry I'm not that familiar with this error. I tried searching your error message on Google and a lot of other sites suggest that it's probably due to a wrong port (though there was one site said that the problem was due to a virus, hopefully this is not your problem). The solution to the port problem is found here: http://stackoverflow.com/questions/607562/visual-studio-development-server-using-wrong-port[^] Hope this fixes your problem.

    Rafferty

    ASP.NET help question csharp asp-net sysadmin

  • Error IN asp.net
    R Rafferty Uy

    Only VS 2003 required IIS, later versions no longer requires it. Maybe it's just your web application that doesn't compile or run properly?

    Rafferty

    ASP.NET help question csharp asp-net sysadmin

  • Can I just use the standard icons in my web application without getting into licensing issues?
    R Rafferty Uy

    Hi, I'm in need of using the standard Excel and XML file-type icons for a commercial web application, can I just use these or should I "purchase" these icons first? Thanks in advance.

    Rafferty

    ASP.NET xml question

  • Generate report and download without refreshing (post-back) the page
    R Rafferty Uy

    Hi, I want to have a set of "export" buttons which generates a different type of report when the user clicks any of these, and then prompts the user to download the generated report (let's say that this report is an xls file). What should I do so that when the user clicks the button, it will not post-back the page and still prompt the user to download? Is there any control that I can use? Thanks.

    Rafferty

    ASP.NET question

  • Help me understand this unusual query... [modified]
    R Rafferty Uy

    Wow this is very useful! Thanks a lot! :thumbsup:

    Rafferty

    Database database help tools question

  • Help me understand this unusual query... [modified]
    R Rafferty Uy

    hm... maybe I'll do some experimenting when I find the time. Thanks for your help!

    Rafferty

    Database database help tools question

  • Help me understand this unusual query... [modified]
    R Rafferty Uy

    So using LIKE will not use the database indexing even if there are no wildcards in the passed string?

    Rafferty

    Database database help tools question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups