ASPFriends.com 'aspngcs' list Archive - January 2002
Messages
Page: 123
Sub (4 replies)
ASPFriends.com 'aspngcs' list
What is the equivalent C# equivalent of the VB Sub method? Thanks, Dean Santillan Email: webmaster@5dayweek.com
Accessing public var in codebehind (2 replies)
ASPFriends.com 'aspngcs' list
In my codebehind I declare a public variable and assign in a value in my bindPageData() function which calls dataBind(); and therefore I can use that public variable in my .aspx file as % variable% . Now, the page has paging, so when the user clicks on NEXTPAGE I change the value of that variable, but for some reason the old value from page#1 remains....whats the problem? Is this a post back probl...
Problem Including Library (7 replies)
ASPFriends.com 'aspngcs' list
Hi, I am trying to include a C# Library into a code behind page and am running into difficulty with what should be relatively straight forward. I have created the library, and compiled it. (using Class Library Project) I have placed the DLL (sqlDataInterface.Dll) into the bin directory of the Web Application. (I also tried putting it into the root of the Web application folder), but when I compile...
ChatServer (5 replies, VIP)
ASPFriends.com 'aspngcs' list
Hi everyone, Studying some features of another languages I've seen that there's some way for invoke remote methods, i.e. using applets (sorry, I didn't want to say the language, but, ok, Java :) As the subject says I'm wanting to use RMI implementing a chatServer that accept messages and delivers them to all other clients connected. This can be done doing a chat server and a (applet) chat client. ...
readonly / constant property (4 replies, VIP)
ASPFriends.com 'aspngcs' list
Want to do something like so: switch(somecharacter) { case myobject.property: do something ... } What can I do to get it to recognize the property as a constant? The value of it is being pulled from an xml file and set via a different property. Thanks, Ryan
Communication with Commerce Server COM Objects (2 replies)
ASPFriends.com 'aspngcs' list
I am trying to get at the data inside a COM Object returned from Commerce Server. It comes back into my aspx file as just an "Object", but I need it to be strongly typed so I can get at the values inside. 20 I have tried referencing MSCSCoreLib and casting the Com Object into different things in there, such as IsimpleList or CsimpleList, but the cast always fails. I've also tried using Marshal.Cre...
Errors (6 replies)
ASPFriends.com 'aspngcs' list
Could anybody explain what this means I am totally lost!! Object must implement IConvertible. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Object must implement IConvertible. Source Error: Line 208: ...
DropDown list selected item (2 replies, VIP)
ASPFriends.com 'aspngcs' list
I have two dropdown lists in the same page, what I am trying to attempt Is to get the end user to select from a category once selected it populates the Second dropdown list with the required data for that category. Then I have a button which adds the required data id from the second dropdown list to the database along with Other details. The second dropdown list is populating correctly but when se...
Casting I think (5 replies)
ASPFriends.com 'aspngcs' list
Could someone explain what the diference is between these two lines of code 1. ListBox ContentListBox (ListBox) Page.FindControl(PageModule); 2.ListBox ContentListBox (ListBox) this.FindControl(PageModule); When I use "Page.FindControl(PageModule)" it gives me InvalidCastException. But when I use "this.FindControl(PageModule)" it works fine???? I am using this in an eventhandler. Thanks, Dean Sant...
Using Global.asax - application variable (7 replies)
ASPFriends.com 'aspngcs' list
Hi, I'm aware that web.config can be used to store a connection string but I would like to see an example of referencing an application variable application("connectionstring") "...." How can I reference this in a Web Form C# function ? Thanks, Paul
Accessing Control Values Problem (11 replies)
ASPFriends.com 'aspngcs' list
I keep getting this error Value null was found where an instance of an object was required. Exception Details: System.NullReferenceException: Value null was found where an instance of an object was required. Source Error: Line 25: get Line 26: { Line 27: return (int) ContentConfiguration.ContentID; Line 28: } Line 29: This my code in the user control, all my controls are loading using the ContentI...
Attributes (2 replies)
ASPFriends.com 'aspngcs' list
Hi, I am a bit lost as to what this means or does, could someone explain the meaning of this Line of code please. [Browsable(false),DesignerSerializationVisibility(DesignerSerializationV isibility.Hidden)] Thanks, Dean Santillan Email: webmaster@5dayweek.com
radio button list errors (12 replies)
ASPFriends.com 'aspngcs' list
what's wrong?? When I click on the button to vote, i get a error: Exception Details: System.NullReferenceException: Value null was found where an instance of an object was required. Source Error: Line 65: { Line 66: Line 67: Response.Write(rblChoices.SelectedItem.Value); Line 68: Response.End(); .ASPX ********************************************************* TR td asp:radiobuttonlist id "rblChoice...
questions on inheritance (C#) (5 replies)
ASPFriends.com 'aspngcs' list
If class User inherits from class Person, and class Person is IDisposable, does class User need its own Dispose() method, or does it inherit Person.Dispose()? Another question, do I need a ~User(), or will User use the ~Person() finalizer? Francesco Send and receive Hotmail on your mobile device: http://mobile.msn.com
can i access Request.Browser or Cookies or Sessions from a custom class? (4 replies, VIP)
ASPFriends.com 'aspngcs' list
I have the following using statements in my custom class: using System; using System.ComponentModel; using System.Collections; using System.Configuration; using System.Web; using System.Web.SessionState; using Custom.DataAccess; and I still cannot directly access Request.Browser or Request.Cookies or Session variables from within a method in my class. What am I missing? The class I am referring to...
RegEx Parsing Error (6 replies)
ASPFriends.com 'aspngcs' list
I am trying to screen scrape some data from weather.com, but when I load the Response Stream into a Regex object as the string pattern, it gives this exception at run time: Server Error in '/myApp' Application parsing ".... the source of weather.com page goes here...." Source Error Line 55: Regex regexp new Regex(result); Heres my scrapeing code: string result; WebResponse objResponse; WebRequest ...
getting subclasses? (3 replies)
ASPFriends.com 'aspngcs' list
given a Type, how would I get all known direct subclasses of it? ( within the current assembly is all that is neccessary ) Andy Smith Andy Smith Chief Code Monkey
CType equivalent (4 replies)
ASPFriends.com 'aspngcs' list
What is the equivalent of the VB function CType() in C#? thanks
2 method errors (3 replies, VIP)
ASPFriends.com 'aspngcs' list
The following code raises 2 errors on compiliing. Random myRand new Random(); public string ShowQuote() { switch (myRand.Next(3)) { case 0: return "Look before you leap"; break; case 1: return "Necessity is the mother of invention"; break; case 2: return "Life is full of risks"; break; } } The errors are: 1) 'TestWeb.comp1.ShowQuote()': not all code paths return a value 2) Unreachable code detecte...
String question. (3 replies)
ASPFriends.com 'aspngcs' list
Copied from [aspngfreeforall] to [aspngcs] by Charles M. Carroll darthcarroll@asplists.com Hi, I have this simple method that takes a string as an argument: public string ConvertToText(String st) { String test st.ToString(); if(test "1") { return "Yes"; } else { return "No " st; } } For reasons I can't figure out it always returns false even when I pass it the string "1" ? Any ideas what I am doin...
ServicedComponent class (8 replies)
ASPFriends.com 'aspngcs' list
I'm trying to create some classes that are drived from the ServicedComponent class so they can do Automatic Transaction processing. I want to be able to use these classes within my ASP.Net pages. I don't get any errors during the compile, but at runtime I the following error: Invalid ServicedComponent derived classes were found in the assembly. (Classes must be public, concrete, have a public defa...
Embeding C# objects in web pages (10 replies)
ASPFriends.com 'aspngcs' list
Any know where I can read information on embedding .NET objects in web pages for people that have IE6 and the framework installed. TIA Joshua Perry
switch versus if...then, any real differences or just style preference? (3 replies)
ASPFriends.com 'aspngcs' list
Is there any significant differences between these two versions of the same thing? Thanks, Francesco switch version: switch (newVisitor.GetCookie("mine")) { case null: newVisitor.idDatabase newVisitor.SetCookie("mine"); newVisitor.CookieStatus Visitor.enCookieStatus.PendingVerify; break; default: newVisitor.idDatabase newVisitor.GetCookie("mine"); NewVisitor.CookieStatus Visitor.enCookieStatus.Ena...
Object Oreinted Design & programming (2 replies)
ASPFriends.com 'aspngcs' list
Does any know of some really good and interesting books that could make me Understand OOP in the real world situation I am really tired of reading books That implement cars and coffee machines as an example of OOP I am looking for OOP that can help me understand better how to develop a web of software Application in conjusctiion with each other. WROX makes me sick wasted too much money On them. Th...
cookies reporting back unreliably, or is it me? (8 replies)
ASPFriends.com 'aspngcs' list
When a visitor hits my site, I check for an existing cookie of mine. If I find one, I go about my merry way, but if I don't, I try to set a new one. On the next page loaded, I try to read the cookie I just set and set a flag called CookieStatus. Unfortunately, when I turn privacy and security to high, disabling cookies, through the browser (NN 4.78 and IE 6.0), my flag still gets set as enabled. W...
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