No, we aren't all lazy. Faced with something like this, I would
a. Write my own if I wanted the challenge
b. Actually search Google for details of things that match my criteria have already been written
c. Write my own because the result of b failed to turn up anything suitable
You failed to do any of these steps so, I suppose according to your own words, you're lazy.
Hello Everyone, I Was Working On My WPF Project & I'm Stuck In A Problem! I Have Two Form Names ViewProduct & Cart; I'm Creating An Instance Of Cart In The ViewProduct Form & Passing A DataSet Set To The Cart Class [Whose Constructor Is Overloaded & That Accept A DataSet]
Here Is My Code Of ViewProduct Form:
private DBConnect connection = new DBConnect();
private DataSet dataSet = new DataSet();
private BindingSource bindingSource = new BindingSource();
private Cart cart = null;
..... Some Stuff .....
Function In Which Cart Instance Is Created!
And The Error Is:
An unhandled exception of type 'System.NullReferenceException' occurred in ePurchase.exe
Additional information: Object reference not set to an instance of an object.
use the new keyword to create the instance of the object
On Calling Default Cart Constructor I Get No Error Because I Fill The dataset By Creating An Object Of DBConnect Class & Calling It's Method; Doing This I Get No Error But Calling 2nd Constructor I Get The Above Error!
Default Cart Constructor
this.dataGridView1.AutoGenerateColumns = false;
DBConnect con = new DBConnect();
this.dataSet = con.GetRecord("Product");
this.bindingSouce.DataSource = this.dataSet.Tables["Product"];
this.dataGridView1.DataSource = this.bindingSouce;
bindingSouce.Filter = "id=0";
Also, In The Cart Form, I Initilized BindingSouce While Declaration & The Code Of Cart For Its Attribute Is As Follows:
All I found via google were kind of examples how to use IIS under windows server. I am not working under windows server. I would like to redirect webrequests (port 80/443) if they matches to a domain/IP I specified to a new Domain/IP I specified too. I know I could edit HOSTS file, but I'm searching for another way how to do so. Is there any windoes file I could directly access using c# whitch supports redirects or did you've some ideas how to get this task done?
Your only other alternative is a separate proxy server. But, if you're doing this on a single machine connected to the internet, it's kind of pointless since it's easy to bypass a local proxy server and just go directly to the 'net with it.
All browser requests would go through this proxy and it can filter on whatever you want.
It's better to just go with an off-the-product than try to write your own.
First of all: whose traffic do you want to redirect? Some traffic originating somewhere in the web and requesting something from your web server? Or traffic originating from a web browser on that machine?
Firstly, stop developing your own, and use the existing system: MSDN: Introduction to Membership[^] - it provides all the facilities you are likely to need, with much better security than you will achieve alone.
Just add a MenuStrip control to your form from the toolbox in the Designer, and it's pretty obvious from there in - it even prompts you with "Type Here".
Then double click the menu options you need code for, and it will add the method skeleton for you.
If you try a basic google, it will find loads for you: Add Menu Strip C#[^]
examples, tutorial, videos. What more do you need?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
NM... I think I'm on crack again... LOL... the new formula does work. If my range is 0 to 10, the mid point is 5. And the mid point on a control 30 pixels high, the pixel range is 0 to 29, so the mid point is 14.5 .
Ah, so I was pretty close... I guess I shouldn't try to write code at 11pm LOL... got thrown off by the 0 / 1 0 - 29 = 30 points thing haha... when I woke up this morning, I was like what the hell was I thinking?
Last Visit: 31-Dec-99 19:00 Last Update: 18-Dec-14 6:02