|
Thank you, this is what I need.
|
|
|
|
|
No problem
|
|
|
|
|
|
You can use parametrized constructor for SuperMartDB class which accepts a connection string
Or you can create a property called ConnectionString in SuperMartDB class then set its value from FrmMain.
I would prefer you to use the parametrized constructor approach.
Be careful, there is no Undo Button(Ctrl+Z) in life.
|
|
|
|
|
Add the form's namespace to the top of the class file.
using NamespaceOfForm;
That should do the trick.
You could also do this to access the variable (but use the above method if you need it more than once):
NamespaceOfForm.connStr
Kristian Sixhoej
|
|
|
|
|
Hello everyone,
I'm trying to do the following through C#:
1) Change my display device. For example, from my monitor (connected via DVI cable) to my tv (connected via DVI-HDMI).
2) Change my sound device. For example, from my speakers to the tv's audio input.
So far, all I was able to find is get the list of screens connected to the system through Screen.AllScreens but nothing more.
If this can be made without using windows API it would be best, if not than some code example would be a huge help.
Thanks in advance,
Yosi
|
|
|
|
|
Where I can find programming examples of client SQL server applications in C#? Excepting codeproject and microsoft.
Thanks
|
|
|
|
|
Sourceforge? I don't know, you just want written applications on anything as long as they interact with a database?? Why don't you learn through the documentation instead of shifting through code to learn-by-example
|
|
|
|
|
Hi all i want print,printpreview operations only on panel contents please reply
thanks in advance...
Please this link to get problem clearly i attached image..
http://duscussonline.blogspot.com/
|
|
|
|
|
Don't repeat your question, use the edit button, we have all already seen your original post.
Again, what have you tried? Did you try LOOPING through the PANEL controls collection and printing whichever properties you see fit??
|
|
|
|
|
It's the second time you replied with the same sentence...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Lies!! I posted a little something extra to get him on his way in the third post
|
|
|
|
|
Hi all i want print,printpreview operations only on panel contents please reply
thanks in advance...
Please this link to get problem clearly i attached image..
|
|
|
|
|
Don't repeat your question, use the edit button, we have all already seen your original post.
|
|
|
|
|
need to do the following with C#, under visual studio ,
when button "Start" been clicked the current time of the system must
be get and saved in a variable, when button "Stop" been clicked the current time of the system
must be get and saved in a variable, also the difference
between the stop and start must be get and displayed in a text box (in seconds),
please need the C# code for that,
i treid with
DateTime dt = new DateTime();
dt.seconds;
but it did not work. any help will be appricated.
|
|
|
|
|
As always with simple problems like this your first port of call should be the documentation. Put the cursor over DateTime in your code and press F1. Browse down through the help to the DateTime.Now property which you will find very useful in the context of your problem.
If you also read up on the TimeSpan structure you'll have a solution in a few minutes.
Good luck, Alan.
|
|
|
|
|
The DateTime.Now [^] property looks promising...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
As the other replier said, documentation should always be your first line of defense (or offense?). Let me say, welcome to codeproject, you'll find a lot of helpful people here. None of which will sen dyou the code for anything, and you will usually be scorned or smitten with an array of witty subjective insults belittling you for not reading the rules and doing something as insulting as demanding free code.
With that being said, this clearly seems like homework for a basic programming course, if you are having that much difficulty, please, go see your teacher. Get a better understanding of what it is you need to do and start reading that textbook you hopefully purchased for this course.
|
|
|
|
|
Hi All i want to print only Panel contents on Window form...please reply..thanks in advance..
|
|
|
|
|
Have you tried anything at all yet?
|
|
|
|
|
Hello everyone,
I met with issues when browse for WSDL information for a web service. When I am using F5 in Visual Studio to browse http://localhost:21530/Service1.asmx, everything is fine (e.g. web service textual description is shown)
But when I pubish the web services to my local IIS 6.0 server and browse from IE http://localhost/Service1.asmx, here are the error message and my simple web services source code.
Does anyone have any ideas why?
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public double HelloWorld()
{
return new Random().NextDouble();
}
}
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://localhost/Service1.asmx'. Line 1, Position...
<%@ WebService Language="C#" CodeBehind="Service1.asmx.cs" Class="TestWebServicePerformancev1.Service1" %>
-^
thanks in advance,
George
|
|
|
|
|
Probably it's security issue of your server. Check your Web.settings
|
|
|
|
|
Where do you mean the Web.setings file? Do you mean Web.config?
regards,
George
|
|
|
|
|
I'm sorry my mistake. I mean check your web.config and server configuration where you upload your files as well. I had similar problem.
|
|
|
|
|
Here is the content for web.config. Are there anything wrong?
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
regards,
George
|
|
|
|