Topics
-
- 1 reply
- 943 views
I am using Visual Studio 2005 and I'm having a problem getting the DefaultFocus property of a form to work. I made a very simple page to test and it still didn't set focus to my text box. Am I doing something wrong? <body> <form id="form1" runat="server" defaultfocus="TextBox1"> <div> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></div> </form> </body> Thanks, chuck
Last reply by CJLeit, -
-
- Administrators
- 1 reply
- 2.6k views
Hello, I have form that allows me to enter multiple items and perform a batch insert into the DB. I want to add a button, Add Row_Click to add aditional rows without losing the data already in the grid, But I am running into problem using the Add Row Click and receive the error: Column 'CustomerID' does not belong to table. Please tell me what I am doing wrong? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim DT As New DataTable If (Not Page.IsPostBack) OrElse (Not (TypeOf Session("DT") Is DataTable)) Then 'Create Empty Datatable 'DT = CType(gvParts.DataSource, DataTable) …
Last reply by PlausiblyDamp, -
-
- 1 reply
- 1.2k views
Ok, I need to fire some ray from a certain x,y location to any direction (360º). This direction should be set by mouse pointer. Any ideas on how to do it? I'm using GDI+ and C# to accomplish this and I would like to use .DrawLine to make the thingie happen. Can't find anything regard this on the web, so, I don't know even where to start it...
Last reply by EFileTahi-A, -
-
- Leaders
- 2 replies
- 870 views
Hi, To make my form responsible, I use a 2nd thread to do a process. If I try to get the text of a combo box on a form from within the thread, I get cross thread... exception. That is normal, because combo box on the form is for another thread. So I store the value of ComboBox.Text into a string variable and use that string in my thread and it works. One thing is strange here: When I try to get the checked value of radio button directly from within thread it works fine and I receive no exception. > It means that I should continue to do what I do? OR it just works and is not recommended and I should the same as I do for combo box for radio button also? (This…
Last reply by techmanbd, -
-
-
- Administrators
- 1 reply
- 781 views
What I want to be able to do is create a new email withn the users default emaill app. the same as mailto command in html Regards Simon
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 1 reply
- 1.1k views
I am adding a image to an SQL server, which works fine, however when I try to update the image in the database I get the following error: operand type clash: image is incompatable with varchar By the looks of things it happens when trying to update the image in the database, however if I am inserting a new entry then everything works OK. Can anyone tell me what I am doing wrong, below is my vb.net code and stored procedure. I am using oledb instead of sql due to the fact that it works with botj SQL server and Oracle. VB.Net code 'Read image into byte ' save image to stream... Dim clsStream1 As New System.IO.MemoryStream…
Last reply by PlausiblyDamp, -
-
-
- Leaders
- Administrators
- 7 replies
- 2.2k views
I am designing a calculator in C#, I need to write a code for a backspace operation. for that i need to convert the text(string) value in the calculator to a single one dimensional char array, I tried using the following string num1 = "Hello World"; char[] numarr = num1.ToCharArray(); this works only on console and does not work in forms. then I tried using arraylists, string txt1 = "Hello World"; ArrayList x1 = new ArrayList();//initializes the new arraylist x1.Add(txt1);//assigns the variable to the arraylist string txt2 = System.String.Concat(x1.ToArray()); this code crashes the app during runtime, Can anybody help me? PLEASE thanks in advance.…
Last reply by raiden, -
-
- 0 replies
- 717 views
Hi , In Sql Server 2000 I have a Log table "Logs" that conatins the fields 1. OrderNo 2. SequenceID There is another table "Sequences" , that has the fields 1. SequenceID 2. DeliveryDate In the Log table there can be multiple records for an Order with different SequenceID. e.g. OrderNo : SequenceID _______ :___________ 1 : 5 1 : 10 1 : 15 2 : 6 3 : 11 3 : 18 And the Sequences table is e.g. SequenceID : DeliveryDate __________ : ____________ 5 : 02/01/2007 6 : 02/05/2007 10 : 02/10/2007 11 : 02/12/2007 15 : 02/13/2007 18 : 02/16/2007 Now each Se…
Last reply by Rattlesnake, -
-
- Leaders
- 1 reply
- 1k views
Hi, I have a progress bar on my start up form which I'd like to increase from its minimum to its maximum value after form loads! Here's what I try to do on Form_Load event: ... Me.Show() Application.DoEvents() For MyLoop As Integer = 1 To 100 MainForm.EditorProgressBarItem.Value = MyLoop Thread.Sleep(10) Next But it will prevent my form controls from being activated until progress bar fully loads! Is there any better way? I heard I should not use Thread.Sleep ?! :huh:
Last reply by snarfblam, -
-
-
- Administrators
- 1 reply
- 850 views
Hi I have a form which will have a LOT of fields on it. To make the screen manageable I was going to break these fields down into 6 views using a multiview control. I thought there would of been some way to automatically create these fields as textboxes, so i just needed to lay them out. The closest thing i can find is a detailsview, but this doesnt create them as textboxes. The reason why i wanted them as textboxes is because some of the data is stored as memo, and I was going to arrange these as being 4-5 lines deep. Also I cant seem to find the 'easy' way to populate the textboxes with the data. I can do this in code easily enough, but surely there must be…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 1 reply
- 920 views
Hi, I try to work with Environment.CommandLine but it seems to be very hard parsing it! If there are no command lines, the name and path of application will be returned itself. If there are command line(s), the name and path of application + the name and path of files and these will be mixed for as many file as were opened, there are no Count or Item properties so it's hard to parse it, does anyone know a way to parse it in VB.NET? Thanks. :)
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 1 reply
- 756 views
Using attribute "NonSerialized" on certain members of a class can disable serialization/deserialization. I am wondering if I can change this attribute in the run time because sometimes I need these members to be deserialized, however sometimes I don't. I can duplicate the class but maintaining two similar classes is a pain. Thanks.
Last reply by PlausiblyDamp, -
-
- 0 replies
- 2.5k views
I have a Web Content Page in an ASP.NET 2005 Web Application project (the one that compiles all code-behind to one .DLL), using MS AJAX and VB.NET code-behind. I have several pages that allow users to maintain system tables (e.g. States, Countries, Departments, etc.) For some odd reason, when I click on the Add or Update ASP.NET Button controls, the PostBack doesn't always fire for the page. I proved this by running the web app in debug mode with breakpoints on the event handlers. It will fire if I re-click the button a second time. It always will work the second time at worst, and will never "not fire" more than once. The page directive AutoEventWireup is set to false…
Last reply by HardCode, -
-
- Leaders
- 3 replies
- 986 views
Hi, Using "Command" I can open the file which was drag and dropped into my editor and there is no problem here. But one strange problem is here: I have added "Edit" command to the Windows context menu so when user right click on a .html file and select "Edit" he can edit his document using my application. But when my application is opened in this mode, Command won't return the path and name of my file, actually command will return nothing! What should I do here? Thanks.
Last reply by snarfblam, -
-
-
- *Experts*
- 1 reply
- 876 views
Here is my stored procedure: CREATE PROCEDURE dbo.IndividualByMonth @start datetime, @finish datetime, @staff nvarchar AS DECLARE @EIDs as int SELECT @EIDs = EmployeeId FROM StaffList WHERE Username = @staff SELECT TOP 100 PERCENT dbo.Timesheets.Id, dbo.Timesheets.Employee, dbo.Timesheets.[Date], dbo.Timesheets.Parent, dbo.Timesheets.Child, dbo.Timesheets.Hours, dbo.Timesheets.Comments, SUM(dbo.Timesheets.[Hour]) AS [hour], SUM(dbo.Timesheets.[Minute]) AS [minute] FROM dbo.Timesheets INNER JOIN dbo.StaffList ON dbo.Timesheets.Employee = dbo.StaffList.EmployeeId WHERE (dbo.Timesheets.Employee = @EIDs) AND (dbo.Timesheets.[Date] BETWEE…
Last reply by Nerseus, -
-
- 0 replies
- 756 views
So I know how to safely create the runtime my question gets into workflow instances. When you call instance.Start() it gets executed on another thread; more than likely this WF isn't going to be instant, so you need to wait for the completed event, but to do this without having the page already render to the client you have to use the whole AutoResetEvent.WaitOne() and the release method on the completed method. Well it doesn't take a genius to figure out what's going to happen if 50 people are concurrently using the web application and are in different parts of a work-flow - the site is going to crawl. So it seems this thread pausing method, while needed for w…
Last reply by bri189a, -
-
- *Experts*
- 1 reply
- 1.7k views
Hi all I am getting the above error when I go to update a database table using an sql data adapter and dataset. The steps that I follow are: 1. go to the db and use an sql stored procedure to return the data I need, all of which is being selected from the 1 table. CREATE PROCEDURE dbo.SelectAllChangeControls AS SELECT ChangeControls.Id, CONVERT(varchar, ChangeControls.Raised, 103) AS [Raised], Owners.ReverseName, Systems.Name, Status.Status, ChangeControls.CodeChange, Priority.Priority, CONVERT(varchar, ChangeControls.CompletionDate, 103) AS CompletionDate, ChangeControls.CCNumber, ChangeControls.Description, …
Last reply by Nerseus, -
-
- 4 replies
- 805 views
First here is my code. Question at the bottom. the sub that starts a test Private Sub startTest() If Me.chckIVFAT.Checked Then runTestThread(NAME_OF_SUB) End If If Me.chckIVFELO.Checked Then runTestThread(NAME_OF_SUB) End If If Me.chckIVDO.Checked Then runTestThread(NAME_OF_SUB) End If End sub the sub to do the thread Private Sub runTestThread(NAME_OF_SUB) thrdTest = New Thread(AddressOf NAME_OF_SUB) thrdTest.IsBackground = True thrdTest.Start() Do Application.DoEvents() Loop While thrdTest.ThreadState.Running End Sub …
Last reply by techmanbd, -
- 0 replies
- 685 views
Hi I'm experiencing different behaviour on different machines (all using IE6), and just wondering if anyone has any thoughts as to what the problem is. I have a form that views a file. An ID is passed to the form, which does a lookup to the database and gets the file to open. It then checks which type of file it is, and uses the Response object to present the file to the User. A sample of the code used is: strFile = GetFile(id) strType= LCase(Right(strFileName, Len(strFileName) - InStr(strFileName, ".", CompareMethod.Text))) If strType= "doc" Then Response.ContentType = "application/ms-word" ElseIf strType= "jpg" Or strType= "jpeg" Or strType= "bmp" Th…
Last reply by joker77, -
- 1 reply
- 1.4k views
Hi folks, I've a dubt. If I use a query with named parameters like this : string query = "insert into test(name,age) values(:name,:age)" where name is a varchar2 and age is a number(3), If I do this : int age=29; string name="Phil"; OracleCommand myComm = new OracleCommand(sql, myConn); myComm.Parameters.Add("age", OracleDbType.Int32,ParameterDirection.Input); myComm.Parameters.Add("name", OracleDbType.Varchar2, ParameterDirection.Input); myComm.Parameters["age"].Value = age; myComm.Parameters["name"].Value = name; int rowsAffected = myComm.ExecuteNonQuery(); I get an error, because the order is wrong, and it tries to put the name in t…
Last reply by Eduardo Lorenzo,
-
Who's Online 0 Members, 0 Anonymous, 59 Guests (See full list)
- There are no registered users currently online