|
Thanks for the help. Much appreciated. I am experimenting with them at the moment.
Matt
------
Accept that some days you are the pigeon and some days the statue.
|
|
|
|
|
Matt,
You can make that header two ways.
1.) make it a Web User Control and then on any page you want that headret you simply insert your header user control.
You also could implement the Application BeginRequest event in the global.asax file.
Like this and emit a header without having to explicitly add it to each page.
Sub Application_BeginRequest(sender As Object, e As EventArgs)
' emit page header
Context.Response.Write("<html>" + ControlChars.Lf + _
"<body bgcolor=#efefef>" + ControlChars.Lf + "<hr>" + _ ControlChars.Lf)
End Sub
Good Luck,
Martin Garins
|
|
|
|
|
Hello;
I'm in trouble with .NET framework when i want to build and browse a new created empty aspx page. I'm getting following message;
Server Error in '/myaspx' Application.
-----------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The 'Inherits' attribute is not supported by the 'application' directive.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="myaspx.Global" %>
Source File: c:\inetpub\wwwroot\myaspx\global.asax Line: 1
-----------------------------------------------------------------------------Version Information: Runtime Build:1.0.2914.16; ASP.NET Build:1.0.2914.16
How can i solve that problem. Anybody help me?
Thank you...
|
|
|
|
|
Here is my question in all its simplicity:
WHAT THE HECK IS .NET????????
I have searched the whole frigging net and all ive found is so jargon that means absolutly nothing. I have even gone to the trouble of getting .NET Server Beta 3 just to see and there is nothing new.
Please tell me i'm not the only one who is thinking this!
.NET or not .NET? MFC is the question......
|
|
|
|
|
|
Is there a way to define an assignment operator on a managed C++ class?
I tried using the C# syntax, but that doesn't seem to want to work...
What I've got (that isn't working) is something like this:
public __gc class ATTRIB
{
ATTRIB();
ATTRIB(const ATTRIB* a);
virtual ~ATTRIB();
static implicit operator ATTRIB(ATTRIB* a) { return new ATTRIB(a); }
}
|
|
|
|
|
Is it possible to create a single file NET assembly from C# and MC++?
I wrote MC++ class that is a sort of proxy for ASPI API. The rest of the program is written in C++.
I'd preffer single-file than multi-file assembly. Is it doable?
CK
|
|
|
|
|
correction: the rest of the program is of course written in C# nor C++
|
|
|
|
|
I have a class that has been written in plain C++ that makes calls into
a library that exports many functions that take char array parameters.
What I want to know is how I can get / convert the data in a .NET String
object into a plain char array so that I can pass the value into
the function call? Basically any help converting the new .NET types into
older style "unsafe" types would be helpful. Thanks.
|
|
|
|
|
You can use one of two things, either the StringBuilder or you can marshal the string data.
If you need a buffer of some sort, like you need for getting a special folder you need to use StringBuilder
Code courtesy Tomas Restrepo
[ DllImport("shell32.dll") ]
private static extern bool SHGetSpecialFolderPath(IntPtr hwndOwner, StringBuilder lpszPath, int nFolder, bool fCreate);
StringBuilder dirPath = new StringBuilder(256,1024);
bool res = SHGetSpecialFolderPath(IntPtr.Zero, dirPath, CSIDL_APPDATA, true);
If you just need to pass a string in to a function but do not modify it use marshalling. I don't know what will happen if you try to modify it, it could reflect the change, or it could blow up on you.
From Inside C# by Tom Archer
[DllImport("user32.dll", CharSet=CharSet.Unicode)]
static extern int MessageBox(
IntPtr hWnd,
[MarshalAs(UnmanagedType.LPWStr)]
string msg,
[MarshalAs(UnmanagerType.LPWStr)]
string caption,
int type
);
MessageBox(0, "Hello, World!", "This is called from a C# app!", 0);
Both code snippets are untested, but should demonstrate how to do it. I made a minor change in Tom Archer's code and that was to reflect that handles, such as HWNDs should be IntPtr's instead of int's.
HTH,
James
Sonork ID: 100.11138 - Hasaki
and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me
|
|
|
|
|
Thanks for the good information... but is there a way I can convert to an unsafe type BEFORE actually passing the data into a function?
If I've got a String* or Stringbuilder* in Managed C++ and want to convert it into an
unmanged type like char* or LPStr, how is that possible?
-dvryce
|
|
|
|
|
Can't say I know how.
I haven't looked at MC++ too much, only because I don't have any old code I have to work with that would warrant MC++ to me.
Perhaps the DOTNET mailing list could be of some help? Its been a great resource for myself and many others. It is a high volume mailing list though so you'll probably want to subscribe to the digest version, or use the web-based interface.
Sorry I couldn't be of more help,
James
Sonork ID: 100.11138 - Hasaki
and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me
|
|
|
|
|
Hi all,
I have an MFC App.
I'm trying to port it to MC++.
For starters, I'm just trung to port one single View.
When i give __gc , the compiler spews out errors.
macros, DECLARE_MESSAGE_MAP, et al are not MC++ compliant!
So, what do i do now?
I don't want to make this a COM Componenet & use P/Invoke.
I want to change my app to MC++.
What do you guys suggest? I port everything to WinForms?
Man, I have many CFormView , & CDialog's! It would take like eons to do that
PLEASE help guys/gals! any suggestions?
In Anticipation..........
|
|
|
|
|
This question was also posted to DevelopMentor's DOTNET mailing list and an answer came up. I'm posting it here as well so others can find the answer you received.
Brad Wilson wrote:
MFC is not "managed-compatible". If you intend to have your UI be managed, you need to re-write it in WinForms. My suggestion if you do this is to use C#, since MC++ isn't supported with the WinForms visual tools in VS.net. Gluing together MC++ and C# is obviously trivial (assuming that, at the end of the day, there's any reason to keep your C++... there may not be, if the majority of your code is UI code).
Brad
--
Read my web log at http://www.quality.nu/dotnetguy/
Sonork ID: 100.11138 - Hasaki
and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me
|
|
|
|
|
Hello All:
Can anyone tell me what is the equivalent of using data-aware classes in vb.net? Is it by using dataset classes, i.e by creating *.xsd files? If thats the case how do we "set" the connection, database name etc., at runtime? That is at runtime the user would choose the server/database name.
Thanks for all the help
Rashmi
|
|
|
|
|
Hi!
I really need to find a simple way to produce a messagebox, similar to that one would use in a standard windows application before deleting items, saving och closing or whatever.
I used to do this in ASP by using JavaScript on the client (alert...) but I thought I would not have to bother with that now. I've been searching through the SDK several times and still can't find anything usefull. The MessageBox I found seems to work only in Windows applications, not in browsers.
Has anyone seen, heard or done anything that might help me?
Consultant, system/web developer.
IMS Consulting AB, Sweden
|
|
|
|
|
ASP.NET is a server-side thing.
To do anything like that you're still going to have to rely on client-side script.
If you want you could roll your own MessageBox component that you could place on your ASPX pages and use like the Windows version, but in the end it'll have to call down to alert as well. I also have no experience in doing such a thing :p
James
|
|
|
|
|
Hi!
Thanks
I've managed to create a messagebox component but I immediately ran in to further problems: If I want to prompt the user for confirmation or input, how do I get the value back to the server?
As you pointed out I'll be needing to use scripting inside the component, but I still can't figure out how to get the values back from the client immidiately.
I realise you are not experienced in this (nor am I), but I thought I might as well elaborate on my thread so that maybe someone else can supply more information
Consultant, system/web developer.
IMS Consulting AB, Sweden
|
|
|
|
|
I think the easiest thing to do, would be to redirect to a confirmed page.
I think this is what hotmail does in its Junk Mail folder's "Empty Folder" command. You click the button to empty the folder, that brings up the confirmation Alert box, without moving to another page.
If you click ok, it then goes to the confirmed (delete all from folder) page. I think if you click cancel it does nothing, but I've never cancelled that dialog before
HTH,
James
Sonork ID: 100.11138 - Hasaki
and a digital cookie (not chocolate chip, its computer chip) goes to whoever can be the first to tell me what Hasaki means. I know someone registered on here can tell me
|
|
|
|
|
Hi,
You all are the intellectual persons on the list. Among u some r Software Engineer, Professor, students, in short u all r gurus as well as thinkers from different race and religion.Ur time is very precious and valuable. If you don’t mind please visit this site,
http://www.orst.edu/groups/msa/everwonder.swf .(Please turn on the sound)
It will take around 5-7 min(s).Think for just 2min(s) after visiting this site and ask yourself what is the reality, what r the facts and what is the JUSTICE and RIGHTS.
If u think u waste ur time by reading this mail I’m extremely sorry.
|
|
|
|
|
Hi,
Has anyone installed the RC1 and found that an app wizard form app doesn't run (but compiles ok)?
I've searched through the newsgroups and think that it is something to do with the help - the ICON doesn't show up properly which kinda vaguly confirms this.
I've tried to update the help in RC1 with the MSDN Library help and didn't succeed - anyone any ideas?
Thanks.
Al.
|
|
|
|
|
Is it possible to use asp.net with only .net sdk beta2 installed or I need to install the VC7?
Currently I have .net sdk beta 2 installed and the compiler reports an error in .aspx file near the Inherits="something" line.
With the best regards, Vitaly.
|
|
|
|
|
This question applies to managed C++, and I think also to C#.
In managed C++, to import a .NET API into C++, you do this:
#using "dllname.dll" The fact that you import the DLL directly, instead of some other file (like a TLB or LIB) implies to me that circular dependencies between managed C++ DLLs are impossible. This concerns me. Circular dependencies are sometimes useful, as long as they're confined to a single "layer" of the architecture. (Since a layer does not have to be defined as a DLL, but a collection of DLLs that work together.)
How can I make the following example work?
File a.cpp in DLL A does this:
#using "B.dll"
File b.cpp in DLL B does this:
#using "A.dll"
Which one do you compile first? Chicken and egg! I can't find any info about solving this on MSDN.
You don't have this problem when normal (non-.NET) DLLs import from each other, because headers are used at compile time, and because you can generate a A.EXP for A.DLL, then link B.DLL against A.EXP, then go back and link A.DLL against B.LIB.
So, without getting into a long debate about the pros and cons of circular references, how can I solve this problem?
Also, does anyone know if this is a problem in C# as well as managed C++?
- Brian Morearty
|
|
|
|
|
Guys,
I'm a new .NET programmer so bear with me and tell if if I'm making the right choices.
The requirements - clients will need to access services from a browser and desktop app (maybe even multiple OS's). The response needs to be fairly fast and the client requests cannot be lost. On the server side, there is some processing and data to be stored in a DB. The data needs to be accesed mostly by using a browser interface.
This is what I'm thinking - clients will access a Web Service via SOAP. The Web Service will feed requests to a MEssage Queue which will queue as well as transact the resuests so that there is no loss. The DB access will be ADO.NET, web site will use ASP.NET and the code will be in C#.
My questions - from what I've read I need to use COM+ managed services. However I'm not clear if .NET has an MSMQ equivalent (is it MessageQueue?) which will give me all these features easily? I haven't used MSMQ before - will this approach give me a low overhead and a high bandwith?
Also the clients will not have .NET framework - to implement them can someone suggest a lightweight and simple C++ library for SOAP calls (the one on this site uses an older SOAP toolkit), or should I use ATL Server generated code instead.
Thanks a lot and please feel free to criticise!
|
|
|
|
|
Hello everyone i recently installed Visual studio .NET beta 2 DVD and i can open the winform designer. When i create a C# or VB windows program i get an error:
File or assembly name EnvDTE, or one of it's dependencies, was not found
I can right click the form file and edit the code but i cant get it to open in the designer. Any help?
Thanks
|
|
|
|