|
Ok, I am working on writing a forum control and when I try to compile (command line) something very simple I get a slew of errors. This is what the code behind portion has right now, any thoughts? As soon as I comment out the constructor and the Page_Init event everything compiles ok, however when I move the dll file that is created over to the bin, the word "Hello" isn't printed to the screen.
using System;
using System.Collections;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;
namespace DeveloperNotesForum
{
public class Forum:System.Web.UI.Page
{
public Forum
{
Page.Init += new System.EventHandler(Page_Init);
}
private void Page_Load(object sender, EventArgs e)
{
Response.Write("Hello");
}
private void Page_Init(object sender, EventArgs e)
{
InitializeComponent();
}
}
}
The errors look like this:
<br />
error CS1519: Invalid token "{" in class, struct, or interface member declaration.<br />
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Your EventHandler is declared with the method name Page_Init and your method is Page_Int. Hope that helps.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Thanks, I missed the i, however that didn't do it, I copied the errors I was getting from the command line compiler, any more thoughts:
<br />
<br />
C:\Inetpub\wwwroot>csc /target:library forum.aspx.cs<br />
Microsoft (R) Visual C# .NET Compiler version 7.00.9466<br />
for Microsoft (R) .NET Framework version 1.0.3705<br />
Copyright (C) Microsoft Corporation 2001. All rights reserved.<br />
<br />
forum.aspx.cs(16,3): error CS1519: Invalid token '{' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(17,14): error CS1519: Invalid token '+=' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(17,40): error CS1519: Invalid token '(' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(17,50): error CS1519: Invalid token ')' in class, struct, or<br />
interface member declaration<br />
forum.aspx.cs(21,3): error CS0116: A namespace does not directly contain members<br />
such as fields or methods<br />
forum.aspx.cs(34,1): error CS1022: Type or namespace definition, or end-of-file<br />
expected<br />
<br />
C:\Inetpub\wwwroot><br />
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Your constructor needs to be named public Forum ()
Does that work? I put it into a cs file in VS.NET and it wasn't formatting correctly, that's when I noticed that you need the parens.
If you're going to be doing a lot of ASP.NET, then you may want to look into getting VS.NET. Or if you can't afford that, then you should look into getting WebMatrix from www.asp.net[^] It's free too.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
David Stone wrote:
Does that work?
Yep, that pretty much did it.
David Stone wrote:
If you're going to be doing a lot of ASP.NET, then you may want to look into getting VS.NET. Or if you can't afford that, then you should look into getting WebMatrix from www.asp.net[^] It's free too.
Actually I have both , however I am trying to learn all the nitty gritty parts to it by doing it by hand. The IDE holds your hand through a lot of it. Thanks David.
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
Nick Parker wrote:
Actually I have both , however I am trying to learn all the nitty gritty parts to it by doing it by hand.
So much for RAD
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
Nick Parker wrote:
Thanks David.
No problem.
Nick Parker wrote:
Actually I have both , however I am trying to learn all the nitty gritty parts to it by doing it by hand. The IDE holds your hand through a lot of it.
Eeew. I like being able to do the stuff by hand as well, but after years of doing HTML/ASP/JavaScript by hand because there wasn't any really good IDE, I love being able to work in VS.NET.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
1) How do I cause a certain tab in my tab control to be automatically selected when a user does the follow:
a) Clicks an option in the Tree Control.
b) Clicks an option in from the Menu on the top toolbar.
2) I have implemented an outlook type toolbar. When a user selects an option by clicking an icon or tree control option how do I clear the current form (Saving form settings) and casuing the new form to appear. (I use the term form lightly) I'm trying to get a similar action like a tab control, but without using the tab control, and using the outlook toolbar for selection.
|
|
|
|
|
what is the procedure of to logoff the user from the system and thenl ogin remotely(from server to client).what functions are used
what is syntax
r00d0034@yahoo.com
|
|
|
|
|
The ExitWindows() function (API) logs the current user out of their interactive session. LogonUser() (API) can get you the access token of the user you specify, and the LsaLogonUser() (API) looks like the heavy-duty version that can actually create a new interactive logon session. I've never used any of these Lsa functions before, so I can't be of more help in that area.
--
Russell Morris
"Have you gone mad Frink? Put down that science pole!"
|
|
|
|
|
what is the procedure of to logoff the user from the system and thenl ogin.what functions are used
what is syntax
r00d0034@yahoo.com
|
|
|
|
|
sir i want to ask that
"when i press ctrl+alt+delete control should go my own created procedure" not to the operatibg system
thanks
r00d0034@yahoo.com
|
|
|
|
|
I really worry about some of the things you ask here... are you trying to write programs or viruses?
Paul
|
|
|
|
|
Paul Riley wrote:
are you trying to write programs or viruses?
It's either that or he is trying to write a custom GINA.
Not sure if you can do that with a .NET DLL really.
Why not? Maybe you can....
|
|
|
|
|
Ray Cassick wrote:
It's either that or he is trying to write a custom GINA.
Hadn't thought of that. Fair point.
Ray Cassick wrote:
Not sure if you can do that with a .NET DLL really
Might be asking a bit too much of C# but MC++ should be capable. That said, if you can do windows hooking then like you say, why not?
I dunno. I've never written a GINA; I know a bit about it from one of the products we resell (and thus I write an installer for) but beyond that I'm out of my depth.
Paul
|
|
|
|
|
There's a really interesting article in the latest issue of MSDN Magazine about Windows Hooking in C#. It was written by Dino Esposito, another of the C# gurus.
http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/default.aspx[^]
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Don't crosspost, people don't like that...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I'm loading an assembly and then invoking it, which I have no problem doing. However I would like to put some security into it. I use the .NET Permissions but however the assembly can assert those restrictions.
How do I invoke an assembly that I don't trust with it destroying my machine?
Bob
|
|
|
|
|
sir i want to ask that how to halt mouse and key board what is procedure and what the functions are used and if u plz write some code
thanks
r00d0034@yahoo.com
|
|
|
|
|
I've got an application to which I'm looking to add some new functionality to.
I'd LOVE to be able to offer these new functional components as "add-in" modules (similar to the add-ins in VisualStudio).
Does anyone have any advice or a suggested place to start looking for some resources on how to tackle this sort of "modular @ runtime" type of thing.
I've got NO idea on where to begin, and any poke in the right direction would be fantastic.
TIA.
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
How tightly coupled do you want the add-ins? Photoshop, I believe, uses a type of plug-in where, if a function (filter, in this case) in the right folder on startup, it is made available to the app. But I don't know what kind of internal interface it uses.
|
|
|
|
|
Good question.
What I was "visualizing" was this:
Our application has an MSOutlook-style bar, with an icon for each of the current (4) modules that are included in the application.
Ultimate Goal:
Upon deployment of an additional "module" (which will preferably be just copying some new dll's into the bin dir) and some potential "configuration" settings updates, the icons representing the new "modules" will appear in the OUtlook toolbar, and call functionality contained within the new dlls that were deployed.
Clear as mud right?
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
No in fact. That's quite clear. You are going to want to look into the System.Reflection namespace. That's where you can load an assembly into memory dynamically. As long as all your "modules" implement a common public interface, then you can just iterate through all the files in the bin directory and then load them using reflection.
I hope that helps. Inside C# has a really good chapter on reflection and is my all around reference manual for C#. I would highly recommend getting that and working through the examples.
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
This article may be of some assistance. Please not the URL wrap
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp06102002.asp
|
|
|
|
|