|
I am using a Windows 2000 Professional computer with all of the components installed, and with Visual Studio installed. When I try to run the ASP.NET portion of the program, it creates a site at http://localhoast/websitename/ and creates the main form on the screen. However, when I add some controls to the webform1.aspx and attempt to build and browse, it does not display any of those controls. When I look at the source code, it is provided accurately but does not render to the browser. Could somebody kindly explain to me how to correct this problem. Would really appreciate it!!!
|
|
|
|
|
There are several things you could check.
- Try running aspnet_regiis -i (this can be find in the framework directory in windows)
- Check if all the <asp: ...=""> tags are inside a tag.
WM.
What about weapons of mass-construction?
|
|
|
|
|
be sure that you have saved all your coding pages in your project. and notice if your IIS's Web Service Extensions - ASP.net's status is allowed.
good luck!
|
|
|
|
|
Does anyone know how to do this?
Thanks,
bwinfrey
|
|
|
|
|
Each StatusBarPanel object that you add to the StatusBar has a ToolTipText property. Could that work?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Perhaps my question was obtuse --
I want to display the tooltips from my toolbar.buttons in the statusbar as opposed to their displaying as hints that popup where the mouse cursor is.
Thanks,
bwinfrey
|
|
|
|
|
You should have stated your question better.
Here's how I would do it:
1. Create a ToolBar -derived class and add a StatusBar property. Set the property to your form's status bar when you create the toolbar.
2. In the constructor, set the ShowTooltips property to false.
3. Override OnMouseLeave and clear the status bar text.
4. Override OnMouseMove , and check the get the mouse position from the MouseEventArgs structure. Enumerate all the toolbar buttons, and if the point is inside the rectangle of the button (ToolBarButton.Rectangle property), display its ToolTipText in the status bar.
I have never done it, but from a quick read of the docs, that's how I would try to do it in a reusable way. You could even write an article for CodeProject if you develop a good solution!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hello
I am getting followin exception while debug my Server code:
an unhandled exception of type System.ArgumentNullException' occurred in mscorlib.dll Additional information: Value cannot be null
private void InitServer()
{
//Open channel for communication
this.htsChannel=new HttpServerChannel(9465);
//register the Channel
ChannelServices.RegisterChannel(this.htsChannel);
//registration of Remote Object
RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType("RemoteLib"),"RemoteLib.rem",WellKnownObjectMode.SingleCall);
MessageBox.Show("Server is ready to accept clients requests","Server State");
}
i have highlited the line where its throwing exception
Thanks
|
|
|
|
|
Hi!
The only argument I can see in your RegisterWellKnownServiceType() call that could be null is the result of Type.GetType("RemoteLib") .
Probably the framework can't find the Type you want to reference and throws the NullReferenceException.
Change your code like this and look at remoteLibType :
Type remoteLibType = Type.GetType("RemoteLib");
RemotingConfiguration.RegisterWellKnownServiceType(remoteLibType,
"RemoteLib.rem", WellKnownObjectMode.SingleCall); Regards,
mav
|
|
|
|
|
Hello ,
I am making a database program which uses sql 2000 server and c#.One of my forms has a combo box and I want to fill it one of my table's column values.
I searched the whole net using google and search articles and forums in this site , everyone uses a data adepter to fill comboboxes.Since I am using sql server 2000 , is there any way other than using a data adaptor?
|
|
|
|
|
There are two ways to fill your ComboBox:
1. Create a DataAdapter to get your table into a DataTable object, and then bind the ComboBox to the DataTable .
2. Use a DataReader to enumerate all the records in your table, and manually add each item to the ComboBox by adding to the Items collection.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hello to the world,
I thought I read enough C# books - but I have blockage in unterstanding ...
I want to modify a control(textbox) of the calling form by a dialog and give back the result of the input.
How can I do that in general (also more complex controls like richTextBox ?
What I am doing is:
this.textBox1.Text = "ABC";
newDialog d = new newDialog (ref this.textBox1);
d.ShowDialog();
Console.WriteLine(this.textBox1.Text.ToString());
should output
>> XYZ
but
>> ABC
is the result
//the dialog class:
public class newDialog : System.Windows.Forms.Form
{
public newDialog (ref TextBox tb)
{
InitializeComponent();
this.localTextBox = tb;
this.localTextBox.Text = "XYZ";
}
}
I hope you understand the problem
Thank's alot
Frank
|
|
|
|
|
You really only want to use ref for ValueTypes -- int, double, float, byte, enum etc., as well as structs, and you only want to use it on rare occasions. C# makes the distinction between passing by reference and passing by value by distinguishing classes and structs/ValueTypes. Classes automatically get passed to functions by reference.
As for making structs and classes, it's really awkward at first especially if you've just come from C++, but the basic guideline is to use a struct if the object represents some sort of value -- colors, pixels, time etc., and use classes for objects that operate on values within itself. It's also good to try to keep structs under 16 bytes, according to Microsoft.
Hope this helps.
|
|
|
|
|
Hi reinux,
thank you for your reply,
I simply want to copy the contence of one richtextbox to a second one, with the additional task that the first one exists in a dialogbox were the contence will be modified. By closing the dialogbox the contence should be given to the second richtextbox with all properties which exist within the dialogbox-calling class - It seems to be a simple class copy .....
Quite simple, but doesn't work in my way.
Some idea to what's to do
Thank
Frank
|
|
|
|
|
If you want to copy just the text, you can copy the Rtf property of the text box, like:
textBox2.Rtf = textBox1.Rtf;
That'll preserve all the formatting.
I hope I understood you correctly this time, tell me if I'm wrong
|
|
|
|
|
Hello friends, I need some help, please
I need of routines to encrypt and decrypt small amounts of text (max of 64 chars).
I wish what this routines return an fixed-lenght encrypted text, by example, 64 chars too, and I can decrypt too
The crypted text need be in base64.
How I can achieve this?
Regards
|
|
|
|
|
|
I have a large byte array which I used to intialize by reallocating but the array can get rather large and my app can generate quite a few of them and it was causing a lot of paging so I decided to reuse the arrays instead of reallocating them but I need to reinitialize the array, is the following correct?
<br />
<br />
[System.Runtime.InteropServices.DllImport("kernel32.dll")] <br />
unsafe public static extern void ZeroMemory(System.IntPtr ptr ,uint size);<br />
<br />
internal void Clear()<br />
{<br />
GCHandle gch = GCHandle.Alloc(_vector,GCHandleType.Pinned);<br />
ZeroMemory(gch.AddrOfPinnedObject(),(uint)_vector.Length);<br />
gch.Free();<br />
}
|
|
|
|
|
In C# I'd just write a for loop zeroing every entry. Calling out to ZeroMemory complicates things.
In fact for most purposes I wouldn't bother zeroing the array, I just keep track of how much of it was used. If, for example, you're trying to convert an array of bytes to a string using the System.Text.Encoding classes, you can use the overload of GetString which takes an offset into the array and a length to convert.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
The ZeroMemory method appears to be much faster than zeroing the array in a loop - according to the DevPartner profiler - the array can be over 1 million bytes long.
|
|
|
|
|
I've had MUCH bigger. It's much quicker (and much less of a hassle) to just kill the array and reallocate it. Everything will be automatically zero'd out for you.
[EDIT]
Whoops! Hit Submit on accident. Just zeroing out the memory won't avoid the problem of paging. In order to zero out the array, it's got to be swapped back in, zero'd, then swapped back out if needed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That's what I thought but it seems to make a big difference recycling the memory like that. The way the app works means 1000s of these arrays could be created and destroyed - recycling it means I only need 3.
|
|
|
|
|
|
The array should generally be kept in memory I would have thought as it is the focus of the proceesing at the time - everything centres around that array - although it's on a worker thread so I can keep the GUI updated with the progress.
I have been messing about with this code for a while now, memory and performance profiling the hell out of it. It's odd what works and what doesnt.
|
|
|
|
|
I need to keep only 1 "in memory", but I had to swap it every now and then between a working array, which grows in size unpredictably, and a source data array, with a static size. Actually, I was using BitArray's. All I did to conserve and compact memory during the swap was to serialize the current working array to disk (believe me, an array at nearly the capacity of a BitArray object!), dump both arrays from memory, force a Garbage Collect, then recreate the source data array from the serialized object on disk, then blow away the file. Worked great and enabled me to eek out a bit more capacity in the process.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|