|
Take a look at UserControls. I'm pretty sure your book also covers this issue.
By the way, the ASP.NET would be more appropriate for futher questions regarding this or similar topics.
www.troschuetz.de
|
|
|
|
|
Look at www.sahometraders.co.za. When I mean menu I'm refering to Buying, Renting, Timeshare, Developments, Farms. Would you still use a usercontrol for this?
|
|
|
|
|
Hmm, I think it's a bit difficult in this case.
The menu appears on all pages and the look stays more or less the same. But on the other hand the lower row of your menu contains different links on each page.
So when using a UserControl it would be easy to apply changes to the look of your menu but it would have to be costumizable during runtime (apply different links for each page).
Implementing the menu on each page would be the easier way until you decide to change the look.
So mainly this is a design question and up to you. How did you solve this when using the include file?
www.troschuetz.de
|
|
|
|
|
Yes, UserControls are still best for this. You have complete control over what they contain at runtime and with proper caching will get performance similar to #include s.
In fact, if you want conditional includes, you can't use the old ASP method. #include s are processed before the script is interpretted. You would have to create conditionals that assume each #include is already included (like including the raw HTML or something).
UserControls give you must more control and are the recommended replacement of #include s in ASP.NET.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I'm looking for some nice tool to make uml modeling and then convert it into C# project with roundtrip ability. I've tried ArgoUML which looks pretty good, but I've no idea how to genetrate XMI file from my project to import it. C# Generation works well, but I'm not sure if this may be roundtripped.
Regards
h.
|
|
|
|
|
If you want nice - i.e. integration with the VS.NET IDE, roundtrip updates, and much more - and have the money to spend, try Rational Rose XDE for Visual Studio[^]. It's a bit pricy and requires a pretty decent machine to run it, but with my evaluation it was very nice.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Yes, it's great solution. Pricy and heavy, but it's a standard.
But I meant something lightweight, handy and easy to use
but thanx for your answer
h.
|
|
|
|
|
Hello,
I have created a solution that has the main project and a installer project. The installer works great but it is missing a couple things.
1. (most importantly) I would like to automatically start the application after it is installed. I need a dialog box for this and there would be one checkbox. If the user select the checkbox, application should start otherwise not.
2. I would like to launch a webpage in the browser after install.
Any Help would be appreciated!
Thanks!
Ravi
|
|
|
|
|
raviran wrote:
The installer works great but it is missing a couple things.
What have you been smoking?
As someone that's worked with Windows Installer (including beta-testing and consulting) since MSI 1.0, I can tell you that VS.NET's installer project is missing a whole hellofa lot. It gives you the basics, but it's definitely not meant for commercial deployment. For that there's Wise for Windows Installer[^] (my preferrence based on experience, price, performance, and robustness) or InstallShield Developer[^]. There's also the WiX[^] toolset (generating MSIs and MSPs from XML files), one of Microsoft's open-source projects. It's also got a magnificent Custom Action library that would accomplish the very things you want. You could actually just use the Custom Action library and integrate with whatever MSI you want to produce.
With VS.NET's installer project just add a file to your project (like the WiX custom action DLL) then switch to the Custom Action view. Right-click either the root node (to add to all install actions) or to whichever install action(s) you want and select "Add new custom action" (or whatever it says). Browse to the DLL you added and add it. Then switch to the PropertyGrid, specify the EntryPoint, and provide any custom action data (in whatever format you want) required (like a URL to launch).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
good day!! is there a way to retrieve values / changes from documentproperties? the screen is shown when you press 'properties' under the 'Print' window. these can be derived from winspool.drv. I was able to show the screen but my only problem is, as I have mentioned before,how to get the changes made by the user. sample values are the number of pages, and orientation, etc.. many thanks!!!
|
|
|
|
|
hi there
my application crashes when i use Application.EnableVisualStyles()
the app runs fine but as soon as i exit a dialog form the app crashes.
what might be the problem?
VisionTec
|
|
|
|
|
is that in 2005
ByMindOnlyYouCanDoIt
|
|
|
|
|
|
Try using Manifest for enabling style. that will solve the problem. If you have further queries, please do revert back.
|
|
|
|
|
how does printing in c# work? i would like to print some text from a textbox, if the user wants the words to be in color then it would be the users choice.
IM PROUD TO BE A GMAIL;
|
|
|
|
|
do u mean the color appears in the textbox itself or in the printable copy.?
ByMindOnlyYouCanDoIt
|
|
|
|
|
both, in a richtextbox though
IM PROUD TO BE A GMAIL;
|
|
|
|
|
How can I show the images in database (sqlserver) on the Windows Form ???
|
|
|
|
|
You will need datasource and some control able to display data from your datasource.
You can build your datasource using regular SqlDataAdapter (just drop your table on the form) and then generate dataset. Add OnLoad or button event and fill your dataset.
Displaying data is a little bit more complicated since there is no standard control able to do that. There are several solutions:
1. Easiest one - download VB resource kit from Microsoft site. You can find a ComponentOne Studio.NET controls (quite old but full version and free) there. There is some clever control named C1PictureBox which you can bind directly to field containing your image data
2. You can write your own control. You can do that overloading PictureBox control and using byte array, image class and binding events (optional). I think, someone wrote great article about it - it was example of using Northwind pictures in windows forms - try to search for it.
|
|
|
|
|
How can I find out which the method name at run time?
For example:
Class Foo
{
int DoSomething()
{
//here is where I need to find out this method name at run time
}
}
|
|
|
|
|
some stackframe or stackview class will help u...
also u can use reflection
|
|
|
|
|
StackTrace trace = new StackTrace(0);
string currentMethodName = trace.GetFrame(0).GetMethod().Name;
string callingMethod = trace.GetFrame(1).GetMethod().Name;
Charlie
if(!curlies){ return; }
|
|
|
|
|
Hi!
I have a richtextbox with a vertical scrollbar. My problem is that the scrollbar is always at the top. How do I get the scrollbar to always be down, showing the lastest added text?
Andreas Färnstrand
|
|
|
|
|
Hi Andreas!
I have a richtextbox with a vertical scrollbar. My problem is that the scrollbar is always at the top.
You can use the TextBoxBase.ScrollToCaret [^] method.
richTextBox1.SelectionStart = richTextBox1.Text.Length;
richTextBox1.SelectionLength = 0;
richTextBox1.ScrollToCaret();
Best regards
Dennis
|
|
|
|
|
Hi Dennis!
Thanks for your help. It doesn't seem to work though. Here's my code:
private void Print(string text){
this.messagesrichtextbox.AppendText(text + "\n");
this.messagesrichtextbox.SelectionStart = this.messagesrichtextbox.Text.Length;
this.messagesrichtextbox.SelectionLength = 0;
this.messagesrichtextbox.ScrollToCaret();
}
Simple enough, but it won't work. I've tried adding a this.messagesrichtextbox.Select also but it didn't work either.
What's wrong?
Thanx,
Andreas
Andreas Färnstrand
|
|
|
|