Topics
-
-
- Administrators
- Leaders
- 5 replies
- 2.8k views
Can you check if a file is open and/or locked without the try/catch/finally statement? I saw this asked in another thread but the topic turned to exception handling and the original question never seemed to be answered. Thanks MTS
Last reply by snarfblam, -
-
- 1 reply
- 4.3k views
Hi I was wandering if someone could help me with a problem I'm having with my code behind for my submit buttons. What I did was create an html form in Dreamweaver and I created the code behind in Visual Studio 2005 to work with it. I have created a couple of applications in the past like this to work with a couple of other webpages I have but without the submit buttons being used this way and they work fine. Now I have 3 different html pages with the same thing, 2 forms and a submit button with the text "Download" for each one but has a different "ID". All the buttons are calling the same code behind. In the code behind, I want to have it distinguish which button was clic…
Last reply by IxiRancid, -
-
- Administrators
- 4 replies
- 958 views
I am working wirh an ASP.NET 2.0 application. I went to build it, and the following error occured. Can anyone help?
Last reply by kcwallace, -
-
- 2 replies
- 875 views
I have 5 tables thare are linked using a primary key, these are: Organization, Org_Membership, SMS_Credit, Login, and Org_Profile. There is also a sixth table: SentMessages. Currently I am running a command that select some data from each of the tables, places the data in a dataset and sends that to be binded to a gridview on my .aspx page. Here is the sql command that I am using: SELECT dbo.Organization.Org_ID, dbo.Organization.Org_Name, dbo.SMS_Credit.Credit, CONVERT(VARCHAR(10), dbo.Org_MemberShip.Start_Date, 103) AS Start_Date, CONVERT(VARCHAR(10), dbo.Org_MemberShip.Finish_Date, 103) AS Finish_Date, dbo.Org_MemberShip.Status, …
Last reply by mike55, -
- 0 replies
- 896 views
This is an example of Inserting and Retrieving data from xml file. http://www.hanusoftware.com private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here if(!IsPostBack) { BindGrid(); } } private void BindGrid() { ds = new DataSet(); try { ds.ReadXml(@"c:\inetpub\wwwroot\WebApplication10\XMLFile1.xml"); DataGrid1.DataSource = ds; DataGrid1.DataBind(); } catch(Exception ex) { throw ex; } } private void Button1_Click(object sender, System.EventArgs e) { ds = new DataSet(); try { ds.ReadXml(@"c:\inetpub\wwwroot\WebApplication10\XMLFile1.xml"); DataRow row =…
Last reply by hanusoft, -
- 0 replies
- 1.5k views
Hi guys, I've got a little side project that I'm working on that is well outside of my programming comfort zone to say the least! I want to write a Windows Service that subscribes to the Windows Registry and is notified when changes are made. Preferably to a particular Sub-Set of keys but if it had to be all of them it wouldn't be too big a deal. I suppose the first question is, is this possible in .Net? I'm sure it's perfectly doable in C,C++ because I assume thats how anti-virus packages work, but I don't know about .Net. Maybe some kind of native COM interop? Any pointers in the right direction would be great. Cheers GAV!
Last reply by Superfly1611, -
- 0 replies
- 776 views
I am working on a compiler plugin for DarkBasic Pro which is not .NET based, but the DLL I am working on is written in VB.NET. That is fine, I have been able to get the DLLs to work like that. What I need to do, however, is get the handle of the DarkBasic app that the code is attached to. In this case, the app may not be the active window, and the titlebar text may not be known. Any help is appreciated.
Last reply by mooman_fl, -
- 1 reply
- 670 views
I have a datagrid in vb.net. I have used the DataGridTableStyle class to format it successfully - until now. I don't know if what I am doing should be in the DataGridTableStyle, perhaps somehow I should be formatting the grid itself. Several of the columns in my grid are true/false. What I want to do is if the display / contents are 'true', then I want to set the fore color to green, otherwise I want to leave it black. Has anyone used the DataGridTableStyle to successfully do this ? Please share, thank you, laurie mc
Last reply by techmanbd, -
-
- Administrators
- 5 replies
- 1.5k views
I published my website to my web server. Everything works great except for one page. It returns the following error. However, The file it is looking of is in the "bin" directory of the site root. Can anyone point me to a solution? Is there a bad setting? The page in question is http://www.kcwallace.com/osuschedule/ I have also published the entire site to my local IIS, and the page functions perfectly. Server Error in '/OSUSchedule' Application. -------------------------------------------------------------------------------- Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please re…
Last reply by melkanzi, -
-
- 0 replies
- 916 views
Here we are uploading images in File System and storing path in the database. http://www.hanusoftware.com Code (ImageUpload.aspx.cs) :- private void Button1_Click(object sender, System.EventArgs e) { // Here I am uploading images in Images folder of C drive. int intResult=0; string strPath = @"c:\Images\"+Path.GetFileName(File1.PostedFile.FileName); SqlConnection con = new SqlConnection("server=.;uid=sa;database=pubs;pwd="); SqlCommand com = new SqlCommand("Insert into Category(name,imagepath) values(@name,@imagepath)",con); com.Parameters.Add("@name",TextBox1.Text); com.Parameters.Add("@imagepath",strPath); con.Open(); intResult = Convert…
Last reply by hanusoft, -
- 3 replies
- 1.1k views
I'm fairly new to ASP.Net 2.0 and I have a couple (probably simple) questions. I did some searching on this forum, and the tutorials and code library sections too, but didn't find what I needed. Searching google just turned up a lot of sites about how to make a printer friendly version of your page, but not how to actually print. 1) How do I add a button to my page to print my aspx page? I don't need to pretty up the page, or move any controls or anything, I just want to pop up the print dialog and let the user print the page. Looks like the most common thing to do is "window.print()", but Visual Studio doesn't like that. I have an "ASP:Button" control and…
Last reply by MrPaul, -
- 0 replies
- 1.5k views
If I had 3 webbrowsers on a form and the following code. Would all three webbrowsers do their navigation to the 3 pages at the same time, and present the results at roughly the same time? As if for example they were on seperate threads? Thanks Dim Browser1State as Int16 = 1 Dim Browser2State as Int16 = 1 Dim Browser3State as Int16 = 1 Sub Form_Load WebBrowser1.Navigate("www.site1.com/login.aspx") WebBrowser2.Navigate("www.site2.com/login.aspx") WebBrowser3.Naviagte("www.site3.com/login.aspx") End Sub Sub WebBrowser1.DocumentCompleted Select Case Browser1State Case 1 Browser1State = 2 'Enter the login details and click the submit button Case 2 Bro…
Last reply by Mondeo, -
- 2 replies
- 749 views
Hi. If I enter a function into a textbox, for example f(x) = 3x+1 where the 3x+1 is the part entered into the text box. How can I from that calculate the values for x = 2, x = 3 and so on so I can stor the values in array. Im making a application that will plot the function intp a graph so I need to calculate som of the values the function will return so I can plot it. If im not clear in my text respond and I'll try to explain more. Thanks for any help that will be given to me. //A
Last reply by Andi03, -
-
- Administrators
- 2 replies
- 808 views
I am working on a strongly typed collection using collectionbase When I change a property of an item in the collection (such as item.name) I want to validate it against the collection so as to prevent duplicate property values. Similar to the way when you change the name of a datatable that belongs to a datatablecollection, a DuplicateNameException is trown. Is there a recommended/standard way to accomplish this?
Last reply by PlausiblyDamp, -
-
- 2 replies
- 1.5k views
Hi all Firstly apologies if the following posting is in the incorrect location. I have a .CSV file from which I read the data and put it in a dataset, the dataset then undergoes various actions and I end up putting the data into a sql server2005 database. The following is the code that I am using to access to .CSV file and extract the data: Public Function RetrieveCSVData() As Boolean RetrieveCSVData = True Dim cnnCSVConnection As OleDb.OleDbConnection = Nothing Try Dim fileName As String Dim path As String Dim dcUpload(0) As DataColumn If dstCSVFile.Tables.Count >…
Last reply by mike55, -
- 0 replies
- 474 views
Can I add the exeConfiguration file to a project in VS, so I can see the changes made with the configSection interface?
Last reply by jespermohl, -
- 0 replies
- 789 views
Hi, I need to set the background image of the grid view cell according to the data. Is there any way to do this? Thanks, Anup
Last reply by anup_daware, -
- 9 replies
- 1.2k views
Hi Everyone, I've got a small problem with an event that's raised by a threaded component that I've written. The component simply monitors whether a PDA is attached or removed from its cradle and then whether files are added or removed from the folder that is the common link between both PDA and PC. The Event is triggered as you would expect, but the handler behaves in an extremely odd manner - it doesn't seem to execute, but certain calls based within the handler do! I have turned the CheckForIllegalCrossThreadCalls property off for the handling form, but don't see why this should cause any problems. Paul.
Last reply by mandelbrot, -
-
- Administrators
- 3 replies
- 863 views
I would like to draw a Cross sign on the top of button. The button.BackgroundImage is already set to a picture, and I would like to draw the big X on the top of the button instead of button.Enabled=False. any comments? Thanks in advance. button cross.bmp
Last reply by MrPaul, -
-
- 0 replies
- 1.6k views
Hello, I am having trouble reading pixel colors with GetPixel() user32 api from a .NET program which has a form that is in Transparent mode. It's easy to reproduce this on any program you might want to make. I was wondering if anyone if anyone knows why this might be happening and if there is a way around it. Even though there are plenty of pictures, text, etc on the "transparent" form GetPixel can not read any of the colors from those objects. Oh very important is that BitBlt also does not work on "Transparent" forms. So how can one take screenshots of a program? Thanks Public Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As IntPtr, ByV…
Last reply by NeuralJack,
-
Who's Online 0 Members, 0 Anonymous, 60 Guests (See full list)
- There are no registered users currently online