|
You have to specify a physical address, not a logical address. Use Server.MapPath to get the physical address from the logical address.
---
b { font-weight: normal; }
|
|
|
|
|
thanks
Yes, I needed to use Server.MapPath
|
|
|
|
|
here is one good example
http://www.codeproject.com/aspnet/netimageupload.asp
|
|
|
|
|
Hi, how i can read the information of a table into a database, the field names, lengths, the keys and indexes?
|
|
|
|
|
Try looking in the system tables on the Master database.
Roy.
|
|
|
|
|
I Managed to draw on the title bar of a form to give it customized look. Now i want to draw on the taskbar to reflect the same looks on the title bar. Basically i change fonts and draw the caption in different font.one thing to note i don't want to change the system settings. i just want to render the form i am working with.
|
|
|
|
|
By taskbar do you mean to say status bar?
If such is the case then simply define the font size color and style. You should beable to this in both the ide as well in the code.
and regarding the "drawing" do you refer to drawing the text, or drawing an image?
-
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
I think u know the difference b/n task bar and status bar , i think i made it clear i meant task bar. Sometimes it's better to say nothing than "NO-THING" !
|
|
|
|
|
Dear All,
Can I restore the SQL Datbase Backup through C#?
if yes I need some code for that
With Regards
|
|
|
|
|
Have you tried reading the sql Online Books? You should beable to find info on backing-up and restoring by use of a query...
You would just need to set in place a varible or paramater to read from your file input method(textbox entry of file path, etc)
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
I downloaded the software from MSDN Subscritpions
WinFX SDK - Community Technology Preview
1) winFx Runtime Components – September 2005 CTP(English)
2) winFx SDK for the WinFX Runtime components – September 2005 CTP( English)
I downloaded these two ,
First One contains Setup,when I run that one iam getting setup Error.
Iam getting the same error which is mentioned in this site(http://www.ureader.com/message/867599.aspx ) but they suggested to remove previous version of Indigo Beta( March CTP) but I havn't installed that one ,
directly I Installed the New CTP.
It would be a great help, if any one help me in solving this problem
Srinivas
|
|
|
|
|
Hello,
I am looking to find a way to retrieve the name of the method that called the current method. At first I thought there would be something within System.Reflection but unfortunately the only thing I can find is MethodInfo.GetCurrentMethod() which retrieves the name of the method I am currently in.
The reason for this is that I am in the process of creating a logging class, one of the logging functions allows the caller to log that a particular method has been called/exited. For ease and control I would prefer not to have to pass the function name/namespace as parameters. i.e.
private void MyFunction()
{
LogFunctionEntry(MethodInfo.GetCurrentMethod())
}
public static void FunctionEntry(MethodInfo mi)
{
string message = string.Format(
System.Globalization.CultureInfo.InvariantCulture,
"{0}.{1}",
mi.ReflectedType,
mi);
Console.WriteLine(message);
}
At the moment the only other way I think of doing this is to parse through Environment.StackTrace but to be honest this is something I would rather not do.
|
|
|
|
|
The information is in the call stack, so it's from there that you have to get it.
Perhaps there are some other methods that you can use that does some of the work for you. For an example, if you throw an exception and catch it, it will contain a stack trace. Throwing exceptions is quite expensive, though.
---
b { font-weight: normal; }
|
|
|
|
|
Typically I have found the answer to my question within minutes of making the post
Annoyingly it was right here on CP
http://www.codeproject.com/dotnet/MethodName.asp[^]
Solution:
StackTrace stackTrace = new StackTrace();
StackFrame stackFrame = stackTrace.GetFrame(1);
MethodBase methodBase = stackFrame.GetMethod();
string message = string.Format(
System.Globalization.CultureInfo.InvariantCulture,
"{0}|{1}",
methodBase.ReflectedType,
methodBase);
Console.WriteLine(message);
This will output
namespace.function(params)
MyNameSpace.Foo.Bar|MyFunction(object a, object b)
|
|
|
|
|
Aaah, thanks for sharing the info. I found it interesting too.
Did you vote for that kind soul's article?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
oh yes
Voting is good and I get to feel all warm and fluffy inside
|
|
|
|
|
|
This is very true, and a good piece of advice
These logging functions will only ever be called if the application is configured to output "uber developer debug logging"
|
|
|
|
|
This is what I got
[Conditional(<FONT color=maroon>"TRACE"</FONT>)]
<FONT color=blue>public static void</FONT> WriteLine(<FONT color=blue>string</FONT> category, <FONT color=blue>string</FONT> format, <FONT color=blue>params object</FONT><FONT color=darkblue>[]</FONT> args)
{
<FONT color=blue>if</FONT> (debugmode)
{
<FONT color=darkgreen>
StackTrace st = <FONT color=blue>new</FONT> StackTrace(<FONT color=blue>false</FONT>);
StackFrame sf = st.GetFrame(<FONT color=red>2</FONT>);
<FONT color=blue>string</FONT> msg = <FONT color=blue>string</FONT>.Format(<FONT color=maroon>"{0,-15}:{1,-60}:{2}"</FONT>, category,
sf.GetMethod(), <FONT color=blue>string</FONT>.Format(format, args).Replace(<FONT color=maroon>"\n"</FONT>, <FONT color=maroon>"\\n"</FONT>).Replace(<FONT color=maroon>"\t"</FONT>,<FONT color=maroon>"\\t"</FONT>));
System.Diagnostics.Trace.WriteLine(msg);
}
<FONT color=blue>else</FONT>
{
<FONT color=blue>string</FONT> msg = category + <FONT color=maroon>" : "</FONT> + <FONT color=blue>string</FONT>.Format(format, args);
System.Diagnostics.Trace.WriteLine(msg);
}
}
xacc.ide-0.1.1 released! :) Download and screenshots
|
|
|
|
|
Dear all
I have executable that can execute more than once in the same time (you 'll have more than window of it in the same it )how can i change the setting to make it make hin execute once
thx for helping
Best Regards
Charbel
|
|
|
|
|
Where does the first link lead you?[^]
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Where does the first link lead you?[^]
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
I really like your "Where does the first link lead you?" response much more than my boring old "Google is your friend" response... Can I use it?
|
|
|
|
|
I didn't know I'd started a fad I would prefer you, as a token of appreciation for the idea, giving me half your salary and your firstborn.
Of course, use it by all means!
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Hi all,
I have a Page which contains 3 User Controls. (Navigation, Main Content, and Cart Preview)
How can I access a Page variable from these User Controls? Bearing in mind that multiple pages will need to include these User Controls.
For exmaple: I need them to all have access to a querystring.
Thanks,
Pete
|
|
|
|