ASPFriends.com 'aspngcs' list Archive - February 2002
Messages
Page: 123
Different access modifiers on set and get (6 replies, VIP)
ASPFriends.com 'aspngcs' list
I'd like to make a property read only to the public but allow inherited classes to write to the property. Any way to do this? Thanks, Ryan
Casting Performance (2 replies)
ASPFriends.com 'aspngcs' list
Moved from [aspngfreeforall] to [aspngcs] by Charles M. Carroll charlesmarkcarroll@yahoo.com What are the pros and cons of using CType() vs. Cstr,Cbool, etc. (for vb) or (string), (int), etc. (for C#)? I'm particularly interested in performance, but any other thoughts on the matter are welcome. Thanks. Ambrose
Length of String? (5 replies)
ASPFriends.com 'aspngcs' list
What is the syntax to determine the string length of a variable? Thanks Dot Net Guru
Arrays again.. (2 replies)
ASPFriends.com 'aspngcs' list
Hi all... I cannot find anywhere in the online help how to increase the size of an array and perserve the current values in the array. I want to create a dynamic array of type int and add values to the array as and when I want to so I never know the exact size at design time. To give you an idea of what I am after I would do this in Delphi var i: array of integer; begin // Simplified for demonstra...
Handling events raised by dynamic content (2 replies, VIP)
ASPFriends.com 'aspngcs' list
Hi all, Here's the problem: A user control fetches its content from database which includes ASP.NET intrinsic controls. Let say control A.ascx is going to load asp:imagebutton ID "LoginButton" ImageUrl "signin.gif runat "server" at run time. I have added Onlclick "LoginButton Click" to the tag and created the handler in the code behind A.ascx.cs. The application is compiled without any error or wa...
String class with delimiters (3 replies)
ASPFriends.com 'aspngcs' list
Hi all.. I have the following values 5,10, 1 This can be even bigger but the point is is that it is a list of numbers delimited by a comma. In Delphi I can assign this string to a TStringList.CommaText property and the class automatically creates 3 String items in the class based on the delimiter. Is there anything like that in C# or must I roll my own? TIA Mike
Compiler Error CS0052 (2 replies)
ASPFriends.com 'aspngcs' list
Copied from [aspngfreeforall] to [aspngcs] by Alex Lowe webmaster@asp grandrapids.net I'm getting a compile error in RC0 that does not make any sense to me..... This is what the help says... Compiler Error CS0052 Inconsistent accessibility: field type 'type' is less accessible than field 'field' A public construct must return a publicly accessible object. The following sample generates CS0052: // ...
user control cross-talk (3 replies)
ASPFriends.com 'aspngcs' list
Since all user controls are created in the same namespace, I can access values from one user control and use it for yet another control correct? Example: If my page has 3 user controls in it, one user control does a check for Page.User.Identity.IsAuthenticated, now can I not use the result of that call and pass it along to the other use controls so i don't need to call Page.User many times? Origin...
Changing attribute on all labels at once. (7 replies)
ASPFriends.com 'aspngcs' list
Hi All, Quick question, I would like to reset all my labels on a page from the codebehind with 1 small function. I remember in VB it was something like for every L in Label L.Visible true; next or something like that, but I can't figure out how to do it using C#. Thanks, Gavin
Problems With extracting data from Database. (2 replies)
ASPFriends.com 'aspngcs' list
Hi All, Following on from a previous question about using the SqlDataReader to display data from a database I have run into a new problem. I am now using the appropriate methods on my SqlDataReader but I can't seem to assign the data to text controls or dropdown lists. I have the following pcTextBox.Text dReader.GetSqlString(4); aTextBox.Text dReader.GetSqlInt32(5); sDropDown.SelectedIndex dReader...
Template help (2 replies, VIP)
ASPFriends.com 'aspngcs' list
If I have a custom user control, how can add this control to my template class...say I have a header and footer on EVERY page in my site...I am implementing the System.Web.UI.Page ..and all subsequent pages will be Template not Page. any insight would be great! using System; namespace eCommerce.Components { /// summary /// Summary description for Template. /// /summary public class Template : Syst...
Asc and Chr function in .net? (3 replies)
ASPFriends.com 'aspngcs' list
Copied from [aspngfreeforall] to [aspngcs] by Alex Looooooooooooowe webmaster@asp grandrapids.net Hi All, What should I do if I want to use some function like Asc() & Chr() in C#? Thanks Amy
anyone have sample code that generates a button in an aspx page at runtime? (3 replies)
ASPFriends.com 'aspngcs' list
anyone have sample code that generates a button in an aspx page at runtime?
Loop all controls on Page (3 replies)
ASPFriends.com 'aspngcs' list
How can I loop through all the controls on a given page? This gives me 2 specific controls: lblLabel.Text (string)Page.Controls[0].ClientID (string)Page.Controls[1].ClientID;
getting stuff out of a string when you don't know what's in it... (3 replies)
ASPFriends.com 'aspngcs' list
Since we're on the topic of .ToString(), I have a question on how to get the "stuff" out of the Request.UserLanguages string[]. I need to grab any and all info from it and stuff it into a varchar(50) column in my SQL DB. In Classic ASP, asking for the Request("Accept Lang") (I think that's what it was called) would return a string that nicely dumped into my varchar column. Can someone show the bes...
Continued Saga of Tim's Custom Server Control Dilemma (2 replies)
ASPFriends.com 'aspngcs' list
I modeled the asp Table object last night and think I've finally come up with the reasons why my little server control I've been building doesn't quite function like the Table object or other hierarchical controls. Correct me if I'm wrong (PLEASE!), but the purpose of the control collection and control builder is to allow a control to bind into the actual page's control builder and collection righ...
struct vs object (5 replies)
ASPFriends.com 'aspngcs' list
What are the main differences between structs and classes? One is stored in the heap, the other on the stack?
escape backslash problem (6 replies, VIP)
ASPFriends.com 'aspngcs' list
Hello everyone, Hopefully someone will have an asnwer for me. I'm trying to replace some characters in a string, such as domain\tlove, I want to replace the domain\ part of the string. Problem is, I can't escape the backslash such as: myString Regex.Replace(myString, "DOMAIN\", ""); If I escape the backslash such as: myString Regex.Replace(myString, "DOMAIN\\", ""); I get an error about the illega...
how can i get properties of a class just above me? (2 replies)
ASPFriends.com 'aspngcs' list
If I have this structure: namespace mine { class parent { public string x y; class child { private string a b; } } } And, as you can see, I want to default child.a with parent.x is there a way to specify a property that belongs to the parent class just above you? Francesco Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
cookies...what am I doing wrong? (2 replies)
ASPFriends.com 'aspngcs' list
Hi. I am trying to save settings on 5 check boxes. I would like to save the settings when a submit button is hit and then recall the settings when the page is loaded. Unfortunately, my cookies aren't being saved because I don't see anything in my cache at all. Do I need something in the header to make them work? Here is my code, maybe I just did something stupid here. I save the value of the Check...
Newbie / stupid question (3 replies)
ASPFriends.com 'aspngcs' list
(string)((DropDownList)(e.Item.FindControl("edit Product"))).SelectedItem.Te xt; Can someone explain to me what is happening with the above statement. Specifically the to items in parenthesis before the control.. (string)(dropdownlist). I understand in general terms that it is returning the string from the control.text, but am confused why you wouldn't just do this: string myValue e.Item.FindContr...
Casting a string into an enum (2 replies)
ASPFriends.com 'aspngcs' list
Is this the "simplest" way to cast an String into an enum enumVariable (enumType)enumType:Parse(typeof(enumType), stringValue); ???? for example EventLogEntryType enuType (EventLogEntryType)EventLogEntryType.Parse(typeof(EventLogEntryType), "Information"); Rolando
Is remote Compilation Possible? (3 replies)
ASPFriends.com 'aspngcs' list
Moved from [aspngfreeforall] to [aspngcs] by Charles M. Carroll charlesmarkcarroll@yahoo.com Hi: I want to allow one of my colleagues to use the .NET compiler in my machine to compile his c sharp files. I have shared one of my directories for storing the cSharp file. All I want my colleagues is to store their files in this directory and run the compiler off my machine. The resulting dll/exe will s...
Date Compare (3 replies)
ASPFriends.com 'aspngcs' list
I need to compare two dates and see if date 1 is n days less than date 2. I have looked at the DateTime.Compare method, but it did not seem to be able to do what I need. Any suggestions? Thanks! Devin
TcpClient and LAN (2 replies, VIP)
ASPFriends.com 'aspngcs' list
Date CompareHey all, Here is my situation. If I have a LAN set up, but dial up to the Internet, it takes me at least 30 seconds to make a TcpClient connection to my server application. If I disable this LAN connection, it takes me 2 seconds to connect. Is the TcpClient trying to establish the connection on my network cards before my modem? Is there any way to control this? This also happens at my ...
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification