| passing all form values to another aspx page on a c# codebehind? (2 replies) |
| ASPFriends.com 'aspngcs' list |
| Noobie question, I have a button onclick event on a codebehind for an aspx page. What I want to do on the onclick is redirect to another page and pass all the form values from the aspx page to the other page. I dont want to use querystring, session, etc.. Anyone have any sample code to do so? Thx in advance |
|
| Naming Containers (3 replies) |
| ASPFriends.com 'aspngcs' list |
| How do I prevent a stock control from being a naming container? Do I need to subclass it and make my own CreateChildControl method? Thanks, Ryan [This E mail scanned for viruses by Declude Virus] |
|
| Getting RAM size from the Registry (3 replies) |
| ASPFriends.com 'aspngcs' list |
| Hi All! Does anybody out there know how to read the Physical Memory from the registry cause I really don't :( ? I just need to display it in a listBox along with some other info I gathered from the Registry (biosdate, Processor information etc. which btw was no problem to read). The Value I've been trying to get is located in: "HKEY LOCAL MACHINE\HARDWARE\RESOURCEMAP\System Resources\Physical Memo... |
|
| How can I list variables in use and their values (4 replies) |
| ASPFriends.com 'aspngcs' list |
| I'm writing an error handler for a site I am working on and ideally want to be able to list all the variables and their values that are in memory when any part of the application fails. Is there any way that I can access this sort of information? I would also like to see the trace information that you see when you set trace on a webform how do I get this information as well? Thanks in advance. Che... |
|
| Filesystemwatcher (6 replies) |
| ASPFriends.com 'aspngcs' list |
| I'm using the filesystem watcher class. Here is the strange behaviour I am getting. Maybe someone can tell me why, or perhaps tell me a work around: If I take a file from C:\mydir\myfile.htm And move it to C:\myotherdir\myfile.htm The events that occur are: C:\myotherdir\ directory updated C:\mydir\myfile.htm file deleted C:\mydir\ directory updated What I don't understand is why isnt the file the... |
|
| JITTING (18 replies) |
| ASPFriends.com 'aspngcs' list |
| Please can someone explain this: I HAVE read all the docs on jitting at least once. What I am not sure about is this : it compiles objects and so forth as they are needed, just in time. Does it do all this when it is first run and everything is stored, etc, thus a second run 'should' be faster to load up etc. OR Does this then mean that it continues to compile and store objects as they are request... |
|
| Referencing Application State in C# (2 replies) |
| ASPFriends.com 'aspngcs' list |
| Moved from [aspngdata] to [aspngcs] by Tony Stark IronMan@aspelite.com How do I reference an Application State variable from a class? This is what I am trying but I get an error on the HttpContext line. using System; using System.Web; class MyClass { public string MyMethod() { string str HttpContext.Current Application.Get ("MyAppStateVar").ToString(); ... } } The error I get is 'Object reference ... |
|
| Collection Serialization to XML (3 replies) |
| ASPFriends.com 'aspngcs' list |
| Hi! I'm trying to serialize an object which contains a collection. this is the code of the object Persona. public class Persona { ... . [XmlAttribute("Nombre")] public string Nombre { get {return m Nombre ;} set {m Nombre value;} } [XmlElement(typeof(Email))] I don't know what to put here public Emails Emails { get {return m Emails;} set {m Emails value;} } } The Emails collection is defined like ... |
|
| C# File Includes (13 replies) |
| ASPFriends.com 'aspngcs' list |
| I have a few files with constants that I want included in my web applications. How Do I include files in C#? Greg Bernhardt Forum Admin http://www.physicsforums.com |
|
| Slow Execution ? (14 replies) |
| ASPFriends.com 'aspngcs' list |
| Hi ... I'm just getting started with some REALLY simple C# workouts ... "Hello World" stuff ... compile is fine but the execution is SLOW ... I experienced the same thing fooling around with Win VB.NET simple apps I'm talking about .EXE console apps here ... when I do the same things in ASP.NET exec is fast after the first page request/compile ... any thoughts out there ? thanks ... |
|
| enum oddity... (4 replies) |
| ASPFriends.com 'aspngcs' list |
| MessageI can declare an enum like the following: enum MyEnums {ENUM1 1, ENUM2, ENUM3, ENUM23 23, ENUM24}; ... // Somewhere else in a method... for (MyEnums l enum MyEnums.ENUM1; l enum MyEnums.ENUM24; l enum ) { Console.WriteLine("l enum {0}", l enum); } Now, having come from a C POV, that wouldn't even compile because performing an increment on an enum is illegal. But, C# allows that to happen. W... |
|
| Err: "Input string was not in a correct format" (3 replies, VIP) |
| ASPFriends.com 'aspngcs' list |
| I am getting the following error on the code below: "System.FormatException: Input string was not in a correct format." This method has no imput parameters, so I am flummoxed. Any ideas? code: RandomString RanStr new RandomString(); lblRandomString.Text RanStr.Create(); Thanks, Stewart Haddock |
|
| Cast to ascii and back. (3 replies) |
| ASPFriends.com 'aspngcs' list |
| Hello, How do I cast a character to it's ascii equivilant? And then cast it back? iA (asc)"A"; //? iZ int.Parse("Z"); //? sA (char)iA; //? sZ (char)iZ; //? Thanks, Stewart Haddock |
|
| SSL (6 replies) |
| ASPFriends.com 'aspngcs' list |
| What do we need to do in order to make HTTP requests over SSL? I can easily do normal HTTP, but I get the following error when i use HTTPS: System.Net.WebException: The underlying connection was closed: Could not establish trust relationship with remote server. Thanks. Robert Chartier Author and Developer 604 975 5590 rob@aspfree.com http://www.aspalliance.com/nothingmn/ |
|
| I am trying to convert my VB script to C# here are the line that are the culprit (3 replies, VIP) |
| ASPFriends.com 'aspngcs' list |
| I am trying to convert my VB script to C# here are the line that are the culprit // in VB the failing line was like this // Dim parameterSearch As SqlParameter New SqlParameter("@Search", SqlDbType.NVarChar, 255) parameterSearch SqlParameter New SqlParameter("@Search", SqlDbType.NVarChar, 255) parameterSearch.Value Request.Params("txtSearch"); myCommand.Parameters.Add(parameterPortalID); Descripti... |
|
| Random Number Question (15 replies) |
| ASPFriends.com 'aspngcs' list |
| I am working with a Random number and I noticed that the "Next" method does not generate the max number. So "RandomNumber.Next(0,2);" will only generate 0 and 1. Any ideas? Here is the code %@ Page Language "C#"% script runat "Server" public void Page Load(Object sender, EventArgs e) { Random RandomNumber new Random(); int i RandomNumber.Next(0,2); Display.Text i.ToString(); } /script !DOCTYPE HTM... |
|
| Scope of the variable in ASP.NET Page (4 replies) |
| ASPFriends.com 'aspngcs' list |
| Hi, I have a Webform with two text boxes and one button "Next". The following is the Code behind class for my webform. Whenever the pages loads (for the first time), I open a connection to the database, execute an sql statement and store the result in a DataReader Object. Also, I read the first record and display it in the text boxes. Now the problem occures is when I press the Next Button. Logica... |
|
| OO class design question (3 replies) |
| ASPFriends.com 'aspngcs' list |
| I am building an OO Business Logic Tier in C# for a big .NET application, a community web site, ala Yahoo and MSN (but not quite that big). A core object is the Member class, representing a signed in Member of the site. When the Member object detects a sign in, it loads some data for a user that is used in a Control Panel type region, with live statistics. As users click on links for details about... |
|
| Passing C# strings by reference to a COM object (8 replies) |
| ASPFriends.com 'aspngcs' list |
| I am in the process of wrapping a legacy COM object in C# classes to simplify integration with .NET. One of the methods on the object requires three strings to be passed by reference, so that data can be returned. The call is of the form... oCOMThingy.AuthorizeEx (ref object vrt1); According to the docs, the call was designed so that it would work with VB Script variants, when passed by reference.... |
|
| Hourly Check? (13 replies) |
| ASPFriends.com 'aspngcs' list |
| Hi All, I need to run a background service that checks a config file on the hour to see if any site management emails need to be send. If there are it mails them out. How and where would I hook up the timing code? Any pointers or suggestions welcome TIA |
|
| Renaming a file (3 replies) |
| ASPFriends.com 'aspngcs' list |
| I am trying to figure out the best way to rename a file in c#. There doesn't seem to be a File.Rename method or anything close to that. The only method I can find that might work is File.Move(oldname,newname). Is this the only way to do it? thanks Michael |
|
| Decode ViewState? (4 replies) |
| ASPFriends.com 'aspngcs' list |
| Is it possible to decode ViewState info? I have an error handler that displays all the ServerVariables and includes ViewState info if there is any. I just want to know if I can use it or not. Cheers, Julian Voelcker The Virtual World (UK) Limited Cirencester, United Kingdom |
|
| System.DirectoryServices Some Properties... (3 replies) |
| ASPFriends.com 'aspngcs' list |
| I have a System.DirectoryServices.DirectoryEntry , a "User". i can enumerate READ all of its properties, including: RasPermissions 1 UserFlags 513 MaxStorage 1 PasswordAge 1 PasswordExpired 0 LoginHours System.Byte[] FullName testtestusername Description testuserdescription BadPasswordAttempts 0 HomeDirectory LoginScript Profile HomeDirDrive Parameters PrimaryGroupID 513 MinPasswordLength 0 MaxPas... |
|
| Can enums be extened? (6 replies) |
| ASPFriends.com 'aspngcs' list |
| Greetings! Can enums be extended? E.g., can I add a static method to a custom enum? Thanks, Remas http://www.aspalliance.com/remas |
|
| Why text box is not clear (5 replies) |
| ASPFriends.com 'aspngcs' list |
| Hi group Sorry for my stupic question below I put one button and one text box into a form of an ASP.NET page. Thay are all web control. I deleberately set EnableViewState of the text box to false. The content of the text has nothing. In the code behind of the correspoinding class I set the text property of the text control to something like "Yamaha Toyota OShama Bin Laden" only when the page is no... |
|