microsoft.public.dotnet.general Archive - July 2003
Post a message to this list
Messages
Page: 12345
Make a Beep (4 replies)
microsoft.public.dotnet.general
Hi, I want to throw out a series of 'beep..beep..beep' to the speaker. How to do that ? Thanks
invalid cast from string to custom type ? (2 replies)
microsoft.public.dotnet.general
Hello .NetTeam, I ve created my own type Time and would like to add cast support from string vice versa. what do I m missing? any help would be appreciated. Max public struct Time { static public implicit operator Time(string pvalue) { return BasicTypeConverter.timeFromISOString(pvalue); } public override String ToString() {// returns ie. "13:30:33" return BaseTypeConverter.TimeToString(this); } p...
Session Variables - Returns Error (2 replies)
microsoft.public.dotnet.general
I get the following error when I try to retrieve Session Variables using this code: Dim mstrPassword As String CType(Session.Item ("gstrPassword"), String) Exception Details: System.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive According to everything that I have read and found this is set to true. ...
SQL Update Error (2 replies)
microsoft.public.dotnet.general
Using the following code, I am trying to update SQL Server 2000 using vb.net and get an error. It errors out on strTest having ' in the string. It does the same if I have ( or ) as well. Thanks ********************************* oCmd.Connection.Open() Dim str1, strCustID Dim strTest as string strTest "Mo's Data" strCustID "28006" str1 "UPDATE CUSTOMER Mo SET " str1 & "ADDRESS1 " & (strTest) str1 & ...
display:block vs display:none (2 replies)
microsoft.public.dotnet.general
I have a multiple select objects on my aspx page. I want to be able to display only one of them at a time in the same place. If I modify display on each object to "block" or "none" depending on which one I want, the proper one is shown. However, when I do a reload they all appear for a brief moment. ( no value set for style:display in the html ). I tried to set the style:display none for each of t...
Javascript and Valiator Controls Conflicting - VB.net and ASP.net (2 replies)
microsoft.public.dotnet.general
Hi, I am having a problem with the validator controls in VB.net conflicting with the javascript I am using to confirm whether or not the user wants to submit the page. Here is the situation: I am having the user edit a page with text boxes populated from a query against a SQL Server database. When the user clicks on "Save", the information currently contained in the text boxes will be saved to the...
Setting Textbox to Bold (3 replies)
microsoft.public.dotnet.general
I am trying to set the text in a textbox to Bold but I keep getting an error that 'Bold" is ReadOnly? My code is as follows: Dim N As New Form1() If CheckBox1.Checked True Then N.TextBox1.Font.Bold True End If Wayne Wengert wayne@wengert.org
activator and using dll assembly (2 replies)
microsoft.public.dotnet.general
hi. im creating object from assembly dll. after im finish using the object , the process is still using the assembly dll. what i need to do to the object , so the process will not use the dll , and by that , i could compile the dll again (after changing code, while the win app process is still running ..) hope im clear. have a nice day.
Assembly Error (2 replies)
microsoft.public.dotnet.general
Hi all; Does anyone know what the following error means and how to solve it? A first chance exception of type 'System.Security.SecurityException' occurred in mscorlib.dll Additional information: Hash for the assembly cannot be generated. Thanks. Pat.
Using a database password (2 replies)
microsoft.public.dotnet.general
I have a .NET 2003 WinForm application that pulls data from an Access database. If I set the database password to 'one', and run the following code I get an error message that reads 'Could not find installable ISAM.' Dim strConnection As String "Provider Microsoft.Jet.OLEDB.4.0; Data Source C:\temp\db1.mdb; PWD one;" Dim cnn As New OleDbConnection(strConnection) Try cnn.Open() Catch exp As Excepti...
Multiple ListBox columns? (3 replies)
microsoft.public.dotnet.general
Hi everyone! I am very confused. The windows forms ListBox control has a Multicolumn property which I set to true. But when I programmatically bind the ListBox to a DataTable it only displays "System.Data.DataView". When I set the DisplayMemeber property it Lists only the 1 field (DisplayMemeber). My question is how can I list the rows of a DataTable with all the fields of the table in a ListBox. ...
How to disable or delete AddNew row in a DataGrid? (2 replies)
microsoft.public.dotnet.general
There is always a blank row (AddNew row) on the bottom of the DataGrid. How can I disable or delete this row? I just want the row count fixed. Thanks
Selecting from a Dataset? ASP.NET (4 replies)
microsoft.public.dotnet.general
Hello, I have a dataset with 2 tables. I want to display only selected data from one of these tables. The table names are Albums and Tracks. That Dataset is called AlbumsTracks If I only wanted to select those tracks that had a common AlbumID as those in Albums how would I get this out of a dataset? Pseudo code: Select * from Tracks where AlbumID Albums.AlbumID from Dataset Albums tracks. Syntax? ...
ado.net "add new" (4 replies)
microsoft.public.dotnet.general
Hi I am just trying to get to grips with ado.net . I simply wish to add data from some text boxes back to a new row in the dataset on clicking a save button. How do you create the new row in the dataset make sure this row is selected and read the data from the text boxes to the various columns in the data set? Many thanks Julian
System.NullReferenceException Error (2 replies)
microsoft.public.dotnet.general
I am trying to place an strings into an array of strings I am declaring as Dim Fields() As String I have another variable im doing the same thing with and it works. Public Shared Operations() As String This is the error I am getting System.NullReferenceException: Object reference not set to an instance of an object. Here is my code Public Class WebForm1 Inherits System.Web.UI.Page Protected WebFor...
Using Arraylist with arrays (2 replies)
microsoft.public.dotnet.general
I am trying to uae ArrayList to store arrays of structures, but I can't get my data back after storing the arrays. My (highly shrunk and modified) code is below. The problem is at the line labled Line 1. I get an exception thrown saying: "An unhandled exception of type 'System.InvalidCastException' occurred in SLAP.exe Additional information: Specified cast is not valid." I have a watch at line 1 ...
tree structure? (2 replies)
microsoft.public.dotnet.general
First, I'm sorry for my english. Second, I've a little question: is some tree stucture like collections ArrayList or Queue to hold tree of same objects in .NET? Maybe I can use TreeView to that. I must hold tree of Halma's game (like checkers), which I generate with minimax algorithm. Hmm, is it good in english? : ) I hope : ) Thanks for all answers.
Sorting on a datagrid? (2 replies)
microsoft.public.dotnet.general
Help! I am trying to write an ASP.NET app. I have a Jet (Access) database file which is read in by a dataadapter (daTracks). I have bound that to a data grid (dgTracks). Using the property builder, I allowed sorting. The table has 6 fields Author, Duration, Musicians, Track Name, Track ID, Track Number. I want all to be sortable. But what do I put down in the code behind to make this work? I notic...
OO Design Question - Strongly typed ArrayList (6 replies)
microsoft.public.dotnet.general
I'm trying to figure out the "best" way to implement a strongly typed ArrayList. Using inheritance is one approach. It has the advantage that I only have to write overrides for the Add method and indexer. There are problems with this however. First the indexer "override" has a different return type. This doesn't cause a compile time error, but using the indexer doesn't seem to produce a properly t...
Overriding ProcessKeyPreview, Enter WM_KEYDOWN... (5 replies)
microsoft.public.dotnet.general
Hi, I have 3 questions regarding the code below: 1) Why can't I trap the KEYDOWN while I can trap KEYUP? 2) Is it correct that I use Return True within the IF Statement? (I've already read the documentation but it is rather hard to understand so please don't refer to it :) 3) Many examples in the newsgroups use Return MyBase.ProcessKeyPreview(m) as the last code line while I have used Return MyBas...
Newbie: Managing Changes to Forms (4 replies)
microsoft.public.dotnet.general
I have 2 forms and form1 has a button called "Options" which Shows Form2. On form2 I have some radio buttons to change the foreground color of the text in Textbox1 on Form1. Based on the book I am trying to follow Form2 has to create a new instance of Form1 as shown below. If I don't execute the "N.Show" I return to the original instance of Form1 and the change to the foreground color is not seen....
Cache (4 replies)
microsoft.public.dotnet.general
I am currently having a problem with retaining the cache in my asp.net application. I am trying to insert a small DataView into cache, then recall it on various pages throughout the site. When on any page other than the page that inserted the cache, the DataView is null (not the cache object, but the DataView itself). I'm curious as to if my code is wrong, or if the DataView wasn't meant to be pla...
SerializationException (7 replies)
microsoft.public.dotnet.general
I have created an add in for VS.NET and when it starts I want the add in to read the options from file. I have created a class (with the [Serializable] attribute set) that contains the options and implemented GetObjectData(SerializationInfo info, StreamingContext context) as well as a copy constructor: protected Options(SerializationInfo info, StreamingContext context). The serialization process d...
System.NullReferenceException (7 replies)
microsoft.public.dotnet.general
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in system.windows.forms.dll I am sure this is a simple fix, but I cannot find a answer. Terrence
Odd problem with InputBox (5 replies)
microsoft.public.dotnet.general
hey all, I am having an odd problem with the InputBox in VB.NET, and it ONLY happens on one of my computers. When I try "Dim x as String InputBox("TESTPROMPT"), I get the following error: [Exception Details] System.ComponentModel.Win32Exception: Class already exists at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com