We currently have a .Net site at: http://www.wiredtalent.com/default2.aspx?section=About&page=Mission that is using some JavaScript to display a flyout menu from a set of images. I am attempting to convert this functionality to an asp menu, and everything is working fine, except that I can't...
I am working through the first exercise in Professional ASP.Net 2.0 Server Control and Component Development, and the author tells you to use the command line to compile the assembly for the gac using: csc /t:library /out:CustomComponents.dll /r:System.dll /r:System.Web.dll AssemblyInfo.cs...
Perfect, thanks thats exactly what I was looking for.
http://msdn2.microsoft.com/en-us/library/system.io.directory.aspx
If Directory.Exists(path) = False Then
' Create the directory.
Directory.CreateDirectory(path)
End If
If...
Thanks for the input, but what is the command to create a folder? Folder.Create(path) or something like that, and how what is the command to determine if the folder already exists?
I want something like:
path = "UserPics" & intUserID
if not folder.Exists(path) Then
CreateFolder(path)
End If
I am creating an image upload page for my site, and I would like to create a folder for each user. I have the file upload posting to a static folder, but I can't seem to find an example of how to create the user folder on the fly. Any ideas?
Awesome, thanks for the help. I didn't write the class, I am just trying to make it better, but the class should not be calling itself. I was having difficulty with the SqlConnection being used globally, but I finally figured it out. here is the finished class:
using System;
using...
The GetEnvmtName.CheckServer()
code is failing. I am getting the following error:
A field initializer cannot reference the nonstatic field, method, or property 'Database.GetEnvmtName'
The method is grabbing the appropriate datasource?
We currently have a class that does all database actions, but as it is now, each method is creating its own connection. I am trying to add a constructor to the class to allow all methods to use a single connection. When I try to call the Open method of Conn in
the DataTable GetDataTable method...
I have a page with two controls that are databound:
I am using a single connection with two commands, and the code is breaking when I attempt to execute the second reader.
The error says "There is already an open DataReader associated with this Command which must be closed first.", but it is a...
How do I surpress the enter key from submitting an asp:ImageButton?
<asp:ImageButton ID="CatTopNavigationUp" runat="server" CausesValidation="false" OnClick="CatTopNavigationUp_Click" AlternateText="Click here to expand this menu" ImageUrl="Images/CatTopNavigationUp.gif" />
I am using this...
OK, I finally figured it out. The error I was creating was a compile error. I was just trying to test my error handler, but if the code can't compile, it can't be trapped. I created a different error (runtime), and it worked fine.
try
{
int i =...
OK, here is the error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0037: Cannot convert null to 'int' because it is...
I haven't looked at it again yet. Been working on other parts of the app. My guess is that I have an error in the error handler related to the insert of the error. I will post more later today when I get a chance to go over it in more detail.
You know, I never thought of this, but maybe the code that does the insert is causing the error. I will look at that first and then revisit. Thanks for the reply
I wrote a custom error handler class that is supposed to insert the error info into the database when an error occurs, but when I call it from a catch block all I get is the generic error page and no insert. Is there something I need else I need to do in addition to adding a try block to trap...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.