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
S

Sam Heller

@Sam Heller
About
Posts
173
Topics
69
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How To Create Non Effect Update
    S Sam Heller

    I have just created a trigger in a database but I want get it to run now on every row in the table. I figured the best way to do this would be a table wide update that does nothing. But I can't work out how to create such a thing. I have tried

    UPDATE table
    SET column = column

    But no luck!

    Database database tutorial announcement

  • Repeaters, Repeaters, Repeaters
    S Sam Heller

    Don't worry. It's not three repeaters embedded within each other. Just two. I can databind the first one with out any problem and use it's row_databound event to bind the nested one. My issue is I need to put some code inside the row_databound event of the nested repeater. But how do I do this or register the event up? Any help on this one greatly appreciated. Thanks

    ASP.NET help question hardware

  • Altering File Names On Download
    S Sam Heller

    How would you escape the spaces in this way. If I have; Response.AddHeader("content-disposition", "attachment; filename=" + ThisFile.FriendlyName) Thanks

    ASP.NET question database windows-admin lounge

  • Altering File Names On Download
    S Sam Heller

    Yeah the ajax control known as the updatepanel. It doesn't allow the write though and errors.

    ASP.NET question database windows-admin lounge

  • Altering File Names On Download
    S Sam Heller

    Further to this the content disposition method can't handle white space in the file name. I have been forced to run a quick replace to turn them all into underscores. Not ideal but I can live with it? Any suggestions to allow whitespace?

    ASP.NET question database windows-admin lounge

  • Altering File Names On Download
    S Sam Heller

    Hmm the original method you suggested seems to work fine. The only problem is I won't be able to do this from inside an update panel. Any suggestions?

    ASP.NET question database windows-admin lounge

  • Altering File Names On Download
    S Sam Heller

    Yes I guess this is an option. This is exactly the same code that I use to output an Active Report to the user. It does of course invoke a postback though and additional processing. Can you see any issue with this? Any other options? Presumably I would need to load the file in my code into say a memory stream?

    ASP.NET question database windows-admin lounge

  • Altering File Names On Download
    S Sam Heller

    I have an upload section to a site I have built where users can upload whatever files they want. Upon upload a new name is created using a randon string generator and saved into one folder. The new name and the original name are then stored in a database. Simple The files are then displayed in a table on a page where the name of the link is the original name and the randon string name is the absolute link to the real file. This works fine but the file once downloaded comes with the random string as it's file name. How can I alter the name of the file back to it's original name when selected for download? I don't have access to IIS so this needs to be done in code on the fly? Many Thanks

    ASP.NET question database windows-admin lounge

  • HTML images in site
    S Sam Heller

    I have a requirement for a site that has a feature to show previews of other sites. These previews would presmubaly be stored as an image but the code would have to power to produce them itself. ie got to the site, render what was there into an image, which could be saved, and then displayed as I required on the front end. I have found the following product http://www.websupergoo.com/abcdrawhtml-1.htm[^] but it seems to be based around asp rather than .NET. Does anyone know of any other products?

    ASP.NET csharp html com question

  • Error Reporting
    S Sam Heller

    I have the following code in my global.asax file. The reasons I create a page object and pass it is because my error reporting code requires a page object which it then uses parts of to build the report. Now obviously this method provides no page details. Is it possible to get the last page viewed and send that instead of a NULL page. Otherwise is it possible to send some form of machine specific information via my error report. The error report code lies in a seperate vb file. Thanks in advance ' Code that runs when an unhandled error occurs Dim ex As Exception = Server.GetLastError Dim page As Page = Nothing Emailer.ErrorEmail(ex, page) Server.Transfer("~/Error_Page.aspx", False)

    ASP.NET sysadmin help

  • Well coded or not?
    S Sam Heller

    I have the following code. I am returning a string. If I use return where I have in this way is there a chance I could have left some database connections open still? Does it skip the connection "Finish with resources" section? I believe this is the cause to alot of timeout exceptions. Any help much appreciated. 'Gets any previosuly create about us text Public Function GetAboutUs(ByVal ProductID As Int32) As String ' Create Connection Dim HSConn As New SqlConnection(ConfigurationManager.ConnectionStrings("RemoteSqlServer").ConnectionString) ' Create data reader Dim dr As SqlDataReader 'Declare Command Dim HSComm As New SqlCommand() Try HSConn.Open() ' Provide connection HSComm.Connection = HSConn ' Provide command type and command HSComm.CommandType = CommandType.StoredProcedure HSComm.Parameters.AddWithValue("ProductID", ProductID) HSComm.CommandText = "SP_ProductAboutUsSelect" 'Execute the command dr = HSComm.ExecuteReader While dr.Read() 'If there is a Tagline return it. Otherwise return nothing If dr.IsDBNull(0) Then Return Nothing Else Return dr.GetString(0) End If End While 'Return in case value is not found Return Nothing Catch ex As Exception ' Failed to retrieve tagline so return false Emailer.ErrorEmail(ex, Page) Return Nothing End Try ' Finish up with resources dr.Close() HSConn.Close() End Function

    Visual Basic database help question

  • Which database?
    S Sam Heller

    It's shared hosting so there's no choice! MSSQL full blown or the latest MYsql :-(

    ASP.NET csharp database mysql sql-server visual-studio

  • Which database?
    S Sam Heller

    Looking for some quick info from those of you in the know. I am currently working with .net 2 (VS 2005) and mssql 2005 to complete all of my projects but for cost reasons might be forced to use MYSql instead. As anyone who uses my current setup you will know that there is plenty of integration between msql2005 and VS. I would like to get a general overview of the pros and cons of moving to Mysql before I attempt it. Thanks in advance

    ASP.NET csharp database mysql sql-server visual-studio

  • Coding issue
    S Sam Heller

    I have a start time, created when the job is logged. I have a response time, taken from the contract that covers the job. Therefore I have a 'time to respond to by'. Which is the logged time plus the given time span. Therefore this final time is what my calculations are aiming towards. My issue is how do I check if my two times have gone over a lunch time or not??

    Visual Basic tutorial csharp tools help question

  • Coding issue
    S Sam Heller

    I think what you have mentioned here is pretty much what I have described but consider the following. If the start time was 09:00. And the response time was 8 hours, the time to respond by would be 17:00. The thing is this calculation would have gone over lunch time. At which point I need to add 1 additional hour as lunch time is not counted. DO you understand my problem here?

    Visual Basic tutorial csharp tools help question

  • Coding issue
    S Sam Heller

    I am currently trying to build some code which handles response times. I have a start time, an end time and a response time. Obviously enough the end time is the start time plus the response time. For example Start time 12:00 Response time 6 hours End time 18:00. My issue is finding out if the two times went over no working hours. Mainly lunchtime 13:00 - 14:00. If I have the start time and end time whats the best way to find out if they ran over a single lunch time or in some cases several lunchtimes? Any suggestions as to how to code this or any tools in .net that would make this easier to do would be appreciated. Thanks

    Visual Basic tutorial csharp tools help question

  • Datareader using column names. Surely there's a better way
    S Sam Heller

    Hey I'm retrieving datat using a datareader as follows If Not IsDBNull(dr("ClientID")) Then ClientLink.HRef = Page.ResolveUrl("~/secure_code/clients/ViewClient.aspx") + "?ClientID=" + dr.GetInt32(1).ToString() End If But i would prefer to use the column name instead of it's index as I use the SP in various places and would like the flexibility to alter it how ever I feel I want to without anything breaking. ISDBnull allows you to just type in the column name as a string but all of the get methods don't. All I could work out was this. If Not IsDBNull(dr("ClientID")) Then ClientLink.HRef = Page.ResolveUrl("~/secure_code/clients/ViewClient.aspx") + "?ClientID=" + dr.GetInt32(dr.GetOrdinal("ClientID")).ToString() End If Is there a better way???

    ASP.NET sharepoint database question

  • Sharing between projects
    S Sam Heller

    Ok so any classes need to be in a seperate project and then this needs to be reference by the other projects. But what about the app.config file. I failed to mention that this solution is three seperate web services. At the moment they all have their own app.config file. This as you expect contains almost identical content. Thanks

    ASP.NET

  • Sharing between projects
    S Sam Heller

    Is there any way of sharing resources from one project to another under the same solution. For instance a web.config file and it's properties or some classes and their methods. Thanks

    ASP.NET

  • Meta Tags with Master Pages
    S Sam Heller

    I am currently implementing some search engine optimisation accross a large site. The site has a single master page that handles all of the pages. Obviously within each page I can set the pages title using Master.Page.Title = "The title" But when it comes to meta tags there are no available easy way's of tackling this, so i had planned to create some. As follows As one tag and then Public Property MetaTagsDescription() As String Get Return MetaDescription.Attributes.Item("content") End Get Set(ByVal value As String) MetaDescription.Attributes.Add("content", value) End Set End Property to create the get and set properties. My question is this. If I were to add another meta tag and create it's get and set properties how could I got about surrounding these two get and set section into a single meta tag property. So I could do the following code in the page Master.MetaTags.Description = "Hobo" Master.MetaTags.Title= "Hobo" Any help on this one is much appreciated.

    ASP.NET help 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