| form + sql (4 replies) |
| ASPFriends.com 'aspngcs' list |
| Dear colleagues, I'm having a problem with a form when the page is being refreshed in my browser. When the submit button is clicked I call a method (public void) that recollects the filled in Values (Text) of the Textboxes from within the form and executes the SQLstring to add them to a database. The strange thing is that everytime I refresh the page in the browser, the void is being called and th... |
|
| Architectural Question (4 replies) |
| ASPFriends.com 'aspngcs' list |
| Moved from [aspngfreeforall] to [aspngcs] by Marcie Jones marciejones@yahoo.com Hi List, I have a site with 1 main aspx page which dynamically adds custom controls (ascx) depending on a query string parameter. The code behind for these controls access the methods and properties of various classes. Most of the controls access the same classes, for example I have a class 'clsGlobals' which contains ... |
|
| property access (6 replies) |
| ASPFriends.com 'aspngcs' list |
| Hello, I have some properties of an object that should be readonly to the outside of the object. The must be read writeable from within the object. How can I declare this property. Ex: class MyClass { public String Name { get { return Name; } } public MyClass() { Name "test"; // error: property is readonly. } } The purpose is to let the property be initialized in the constructor, and let it be rea... |
|
| Split on NewLine (6 replies) |
| ASPFriends.com 'aspngcs' list |
| How do you split a string into an array based on the newline character. I have a multiline textbox that the user can type a list of items into, which I then want to split into an array based on the newline. I have tried several ways with no luck: This leaves an unprintable character at the end of the first two strings string[] isbn txtIsbn.Text.Split( "\n".ToCharArray() ); This adds blank entries ... |
|
| Threading Exception (4 replies) |
| ASPFriends.com 'aspngcs' list |
| Can anyone enlighten me as to this exception: Cannot implicitly convert type 'System.Windows.Forms.ThreadExceptionDialog' to 'System.Threading.Thread' Heres the code: t new ThreadExceptionDialog( new ThreadStart( sc.Execute(dr["Isbn"].ToString() ) ) ); t.Start(); Thanks! Devin |
|
| ThreadPooling (5 replies) |
| ASPFriends.com 'aspngcs' list |
| Hey all, I have never done any thread pooling before, but I think I have an app that it world work well in. I have a list of items that each needs to perform a possible time consuming network call. Can anyone help me figure out how to get started. I have found several article on Thread Pooling but nothing really good for beginners. Heres the code I have written so far: Thread t; myClass mc; int ma... |
|
| Serializing/Deserializing an object that encapsulates a Hashtable (6 replies) |
| ASPFriends.com 'aspngcs' list |
| I have a class that contains a hashtable which I use to store instances of a simple class. All seems to be fine when I serialize it but when I try to access the items in the hashtable after deserializing it, it gives me an invalid cast exception. Thanks for any guidance Michael here is my code and a sample of the object after being serialized into xml: SOURCE CODE class TestApp { [STAThread] stati... |
|
| Optional Parameters in C# (38 replies) |
| ASPFriends.com 'aspngcs' list |
| ThreadPoolingThe following article has been added or updated at ASPAlliance.com: C# doesn't support optional parameters, despite the existence of situations that would benefit from them and no negative effects of their being included. In this article I describe a technique for overcoming this limitation. http://aspalliance.com/stevesmith/articles/ViewArticle.aspx?id 33 Steve Steven Smith, MCSE Int... |
|
| How do I get directory size (9 replies) |
| ASPFriends.com 'aspngcs' list |
| How do I get a directory size in C#? Miroslav Endys |
|
| getting hold of a control inside a tablecell (3 replies) |
| ASPFriends.com 'aspngcs' list |
| I have created a checkbox at designtime to my dataset table. But how do I read of if it's checked or not when user is Posting the page back through clicking a save button below the table ? DataGrid1.Items[0].Cells[1].Controls[0] is the way to the checkbox control but there is no property for DataGrid1.Items[0].Cells[1].Controls[0].Checked ?? /Johan |
|
| looping a enumerator? (15 replies) |
| ASPFriends.com 'aspngcs' list |
| Can I loop through a enumerator somehow? I want to add all the enumerator info to a arraylist and then to a dropdown? |
|
| IList Indexer and Binding (8 replies) |
| ASPFriends.com 'aspngcs' list |
| I'm trying to return an Array list from the IList's indexer for a custom class and then bind it to a DataGrid. Although the proper number of rows show up in the DataGrid, the grid is binding to the returned ArrayList object's properties (Count, SyncRoot, IsReadOnly, etc.) rather than to the string data it contains. I'm guessing there's an easy fix for this but I'm not quite sure on the syntax. Her... |
|
| dinamic web control & click event (3 replies) |
| ASPFriends.com 'aspngcs' list |
| Hello to all and sorry if i miss group, here is my problemo [: )] on my aspx page have some imagebutton when i click on them in codebehind i create new imagebutton and place it on page. ImageButton d new ImageButton(); d.ID "d"; pagecontrol.controls.add(d); then i assign new click event to ImageButton d.click new System.Web.UI.ImageEventHandler(d Click); but after i click on new imagebutton wich i... |
|
| Hashtable of Hashtables (15 replies) |
| ASPFriends.com 'aspngcs' list |
| I'm trying to create a multi dimensional hashtable, if that makes any sense. In other words, I want a hashtable of hashtables. I know I can make an ArrayList of hashtables, but so far this is eluding me. Here's what I got: Hashtable h new Hashtable(); h["xxx"] new Hashtable(); h["xxx"]["yyy"] "zzz"; However, VS.NET complains, "Cannot apply indexing with [] to an expression of type 'object'". Does ... |
|
| Inheriting from abstract class (14 replies) |
| ASPFriends.com 'aspngcs' list |
| I'm trying to derive from an abstract class and am implementing all of the interface members as appropriate in the derived class. I'm not able to cast from the base class to the new child class though. Since I'm not losing any information in this cast, is there something else I need to do in order to cast between the two (another step I'm missing??)? Here's the framework for the derived class. pub... |
|
| What would be equivalent to IsNumeric (vb) in C# (6 replies) |
| ASPFriends.com 'aspngcs' list |
| Moved from [aspngfreeforall] to [aspngcs] by devin devinr@drone interactive.com In the process of converting some code from VB to C# and I would like how best to test if a string is numeric as can be done in VB. Seems to me that doing an Int32.Parse( mString) and seeing if it throws an exception seems a bit heavy handed but that appears to be the best I can come with. Seems to me there should be a... |
|
| Updated C# language spec... (4 replies) |
| ASPFriends.com 'aspngcs' list |
| This is a multi part message in MIME format. InterScan NT MIME Boundary Content Type: multipart/alternative; boundary " NextPart 001 01C1F5E6.2067E9EE" NextPart 001 01C1F5E6.2067E9EE Content Type: text/plain; charset "us ascii" Content Transfer Encoding: quoted printable I've put a new version of the C# language spec on MSDN. It has improved wording in the static constructor area; I think the rule... |
|
| Inconsistency in language spec? (3 replies) |
| ASPFriends.com 'aspngcs' list |
| In the C# programmer's reference (ms help://MS.VSCC/MS.MSDNVS/csref/html/vclrfStaticConstructors.htm), it says "A static constructor is called automatically to initialize the class before the first instance is created or any static members are referenced" and in the C# language specification (ms help://MS.VSCC/MS.MSDNVS/csspec/html/vclrfcsharpspec 10 11.htm), it says "The exact timing of static co... |
|
| Establishing a Function name (8 replies) |
| ASPFriends.com 'aspngcs' list |
| I want to be able to call a class for logging info to a file with the filename being tied into the function where the logging is occurring. When I call the class using something like: WriteLog.Log(FunctionName,stringToLog); is there any way of determining the Function name automatically? Cheers, Julian Voelcker The Virtual World (UK) Limited Cirencester, United Kingdom |
|
| Controling Form Validation firing (4 replies) |
| ASPFriends.com 'aspngcs' list |
| Hey, I have an aspx page that has a form with an editable datagrid on it. I added an user control (ascx file) with a form on it as well. When I update something on the datagrid, the form validation fires on the user control. This is not the desired action. I want the two forms to be independent. Any ideas? Any articles on this specific scenario? Thanks, Stewart Haddock |
|
| Datetime in C# (2 replies) |
| ASPFriends.com 'aspngcs' list |
| Moved from [aspngcommunity] to [aspngcs] by Jeff Widmer jeffwids@aspalliance.com Hallo, I search a code example that displays the current date and that execute an action at a give time. Thx. Bert MSN Foto's is de makkelijkste manier om je foto's te delen met anderen en af te drukken: http://photos.msn.nl/Support/WorldWide.aspx |
|
| VB.NET vs. C#: () vs. (3 replies) |
| ASPFriends.com 'aspngcs' list |
| Moved from [aspngdata] to [aspngcs] by Chaz charlesmarkcarroll@yahoo.com Quick question which probably applies in numerous spots .NET programming, but for me it arose with the OleDbDataReader object. I am writing code in both VB.NET and C# as I am going along, so that I can learn C# (I am old ASP/VBScript guy mostly). I have a DataReader object, and I am inside a while loop or whatnot, and I am go... |
|
| assemblies (2 replies) |
| ASPFriends.com 'aspngcs' list |
| In my class, how can I create an instance of a class from another assembly? TIA DISCLAIMER: The information contained herein is confidential and is intended solely for the addressee(s). It shall not be construed as a recommendation to buy or sell any security. Any unauthorized access, use, reproduction, disclosure or dissemination is prohibited. Neither ISLAND nor any of its subsidiaries or affili... |
|
| Exclusive access to procedure (4 replies) |
| ASPFriends.com 'aspngcs' list |
| Hello, I have a member function from an object and I want to make sure no 2 instances of the procudure ar running through my application. Is there any way to make sure this does not happen? If 2 instances of the object are created, the same restriction must apply ! Best regards, Tim Musschoot |
|
| DataBinding syntax question... (2 replies) |
| ASPFriends.com 'aspngcs' list |
| Copied from [aspngdatagridrepeaterdatalist] to [aspngcs] by Marcie Jones marciejones@yahoo.com Moved from [aspngcs] to [aspngdatagridrepeaterdatalist] by Tim Musschoot Tim.musschoot@rug.ac.be Hi, I am trying to convert some VB.NET code to C#, for learning purposes mostly. I have some standard databinding to repeater and datalist controls, hooked up to DataReader objects, and in VB.NET I can grab t... |
|