Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome :) Hope you enjoy your stay.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome Daniel, hope you enjoy the forums :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok, I've been slacking off again with my welcomes but um...

WELCOME!!! :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Bordeaux0113;

Long story short, every user has some ability (well, almost every user) to affect another user's reputation positively or negatively by 'voting' them up or down in the posts they make.

The amounts that users can affect someone's reputation, per vote, are what you're seeing there. There are some cases (brand new user and a couple of others) where they have 0 ability to affect someone's reputation and there are many cases (veteran or more active users) where they can affect it moreso.

There are also some forums (for instance the feedback forum) where votes do not affect another person's reputation no matter how much ability you have to do so in the other forums.

An explanation of how the numbers work can be found here as well as here. As for how to actually vote the reputation, you should be able to see next to any post (on the upper right) a number with an up and down arrow next to it (the arrows won't appear for your own posts). By clicking one of those arrows you are voting that post up or down. You would also be prompted to affect the user's reputation (with a comment) at the same time. One thing to note is that there are also sub-restrictions on reputation voting that prevent you from excessively giving/removing reputation from the same user over and over.

Hope that helps :)

Bordeaux0113 commented: Nice person with good answer +0
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

microsoft front page

Microsoft Publisher

Honestly to use MS Front Page would cause much the same issue as using MS Publisher in the way that they both generate an a$$load of unnecessary code and script for the simplest things. Also, as indicated by DrJohn, Front Page is not the most elegant option for web development.

There are a number of free web dev tools available online (notably at download.tucows.com (I think I got that URL right)) but in the end, as stated by DrJohn your best bet is to brush up on your web dev skills (HTML, graphics design, DHTML, possibly php or ASP.Net) so you can do as much of it as possible without the use of WYSIWYG (What You See Is What You Get) editors. These editors often are fine for extremely basic web authoring but as soon as you want to do any true level of site customization you will need to know how to 'fine tune' or directly edit the code provided by the editor and well... most of the time the code provided by the editors can be a mess.

One particular tool that I like (not free but relatively gentle on the 'excessive code' side of things) is Adobe Dreamweaver. You should be able to get a non-current version relatively cheap if you can find a discount software store and it's fairly flexible while (generally) only adding code that actually needs to be there.

Hope this helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

The title that shows up on the browser or elsewhere is generally generated by the title tags within the FrameSet page. Very rarely is it generated by the frame content itself but depending on the browser and the page load methods it can be.

Best solution, as indicated by $urya, make sure that all pages related to the "index" of your site contain an appropriate title tag. Though, as I said above, it should only be required of the frameset page.

Also, as indicated by almostbob, it's much easier for people to find and point out the issues related to code if they can see the code. For future reference it's a good idea to include either code snippets (in this case the header segments of your index related pages) or attach files (if your code snippets would be excessively large, you can zip the related files and attach the zip file).

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Excellent :) But that still doesn't address the rest of what I said :twisted:

For example, if you were to go to Google.com and enter a quick search there you'd find that there are a number of resources right there that explain the concept(s) you're asking about. Additionally, if you look at the 3rd reference that shows up with the search I linked it is based out of the other site I mentioned... msdn.microsoft.com.

I've got no problem helping people with complex concepts or coding problems they're having but usually MY first stop when I don't know something is to check google :twisted:

ddanbe commented: Indeed, Google is your friend!! +7
Geekitygeek commented: totally agree :) +2
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

But guess what??? Such a plan will fail because consumers will buy from non-US sources who impose no such tax. It will also fail because it will make our eCommerce businesses less competative than foreign ones.

Which roughly translated means that your customs staff aren't doing their jobs.

Not that I'm happy about it but if I buy something from the U.S.A. online and have it shipped to my home (recently bought Rosetta Stone software for someone in my household to study French) the wonderful and helpful folks at Canada Customs and Revenue (or whatever the department's name is these days cus they change it every few years) are more than happy to send me a bill via the courier company that delivered the package to charge me for any taxes that are required on that purchase.

I don't see why the U.S. customs folks couldn't do the same in your scenario thus eliminating your concern about non-US purchasing.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Without seeing the meat of the actual error (90% of the time if you set the page to debug mode it will show you the line of code where the error is occurring) it's hard to say for sure but...

As a potentially unrelated side-note, were you aware that you have declared String strSQL; as both a global and a local variable (within BindData()) and appear to have initialized it in BindData() and myDataGrid_DeleteCommand/myDataGrid_UpdateCommand/myDataGrid_ItemCommand.

I'm also surprised you didn't get any errors in your global declarations of your connection and command parameters as ASP.Net tends to get picky about setting global variable permissions and such (private, public, static, etc) I wouldn't be surprised if part of the issue comes from an undeclared (at the time of use) objConn variable in one of your delete/update/item procedures.

Hope this helps somewhat, but again a more detailed error message would help pinpoint it more accurately. You can usually enable debug mode on just one page of your app by inserting the debug code at the top of the ASPX page.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

your code looks good but where is con.Open()

Actually, I think that the adapter/fill will open the connection, what's missing is the close of the connection and the actual logic for populating his data.

That being said, in the stored proc on the SQL side it's performing several select statements without naming them individually. There are 5 counts and 3 sums being generated with no variable names associated to be called upon on the ASP.Net end of things. What this would generate is 8 return values without names that would be difficult to populate to a dataset as typed.

What is needed here is some output control on the SQL end to tie each of the SELECT statements to a return value variable such that it can be populated under that variable name (read: column name) in the population of the dataset. Once this is accomplished the dataset can be used to populate front-end fields by referencing the dataset line & column.

Alternately, if the set is to be populated using the existing method then as long as you know which row in the dataset represents which stored SELECT it may work but I still have some doubts over the lack of variable names/columns involved.

I'm thinking that if we were to add a variable to each SELECT line and then a RETURN line to return all the variables in one 'row' of data then you would be able to call on your results from row …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

To start with, that's a pretty solid distinction to make and should be covered in your textbook.

Adding to that, have you perhaps tried looking at online references like msdn.microsoft.com or google.com to try to find the answer prior to posting here?

I ask simply because, honestly, this looks like a homework question and not so much like any effort was put into getting the answer prior to posting it to the boards.

Best of luck with your answer though, I just woke up so I'm not about to dig into my brain for programming theory lessons to provide here :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Below the reply text box it should have a link for solving the thread :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I may be completely wrong here but I think your entire problem boils down to this row of code:

<asp:BoundField DataField="Product ID" HeaderText="Product ID" ReadOnly="True" SortExpression="Product ID" />

More specifically to the ReadOnly="True" statement within that row.

This reference at msdn.microsoft.com is similar in nature to yours but different in the way they bound the data within the GridView however what it boiled down to on their end (for the same error and with the same underlying error code) was that they needed to use the equivalent of EVAL instead of BIND for their read-only GridView segments to avoid this issue occurring.

Not sure how to translate that into the <asp:BoundField...> method you're using but it might lead you in the right direction.

Hope this helps :) Please remember to mark threads solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

If I recall from your earlier threads you were writing this with C#/ASP.Net code-behind yes?

If that's the case you can actually (through the use of <asp:hyperlink...>) set your URL dynamically from the code-behind instead of trying to set it dynamically on the front end.

With an ASP Hyperlink on the front-end you can code in the back-end whatever URL you need based on criteria determined prior to page-load (or from selections made within other ASP components within the page).

Basically what you end up with is something like this.

Hope this helps :) Please remember to mark your thread solved once the issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

If you MUST close the first form then you're doing it in the wrong order.

Instead of using:

this.close();
new form3().Show();

Try using:

new form3().Show();
this.close();

If you close the only active form prior to opening a new form you get the inadvertant side-effect of terminating the application in most cases.

Hope this helps :) Please remember to mark the thread solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

just-tam;

Please post the code related to your login process (minus any security sensitive information like UN/PW's) so that people can maybe have a look and see if there's anything missing or in need of correction.

It's often much easier for people to help debug a coding issue if they can actually see the code :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

priyam,

While I'm sure it's possible to store blog posts and user details and what have you in an XML file... I wouldn't advise it. The more posts and replies and such that you end up with the larger the file will get and eventually it would reach a point where it would overwhelm system resources on your web host.

What you'd be looking for would be a database driven solution. Many hosting providers will give you a MySQL database for free (some even include an MSSQL database for free) which you can set up to contain all of your posts/replies/users/etc.

Calling information from a relational database is much less resource intensive than trying to locate information from an ever expanding flat file (like an XML file) and if you're using C#/ASP.Net for your code-behind the database connection and information management is very easily accomplished if you've had any training/education in how to code for those.

If, on the other hand, you are looking to use a 3rd party blog service to drive your site then you will need to check with those services as to the methods they require/recommend for connecting to and manipulating the data to/from their service (you had mentioned blogger/wordpress).

Hope this helps :twisted: Please remember to mark your thread solved once the issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

What should I do???

What you should do is post a new thread with your own question.

Include samples of your code (specifically the parts involved in the generation and manipulation of your dateTime component) and details of what you're trying to do with the code so that people can take a look and try to help you :)

Resurrecting a 15+ day old thread with something that is not *directly* related to the original post is usually not going to result in answers for you :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

What level of maths do you need to know before programming?

Short answer: Algebra, Trig, and a strong comprehension of standard mathematics.

Long answer: Programming is all about relationships and algorythms. If you don't have a solid foundation in mathematics you will probably be able to do some simple programming as long as you are good with logical loops... that being said, more complex programming (like, for example, game design) involves things like 3D relationships between objects, gravity physics and other fun stuff like that so I guess it depends on the direction you're trying to go with it :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well if you set up the table to have the columnn auto-populate then you are correct, you would not need to add a value when submiting a row from your program.

It's only if you do NOT have the column auto-populating dateTime that you would still need to insert a value at the time that the new row is entered.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok, loop problem :twisted:

Personally I like to do my loops like so:

Label1.Text = "";
for (int a = 0; a < ListBox1.Items.Count; a++)
{
    if (ListBox1.Items[a].Selected == true)
    {
        Label1.Text += " " + ListBox1.Items[a].Value;
    }
}

I think that might solve your issue. The way your code is written it's taking the "selectedvalue" which I think is basically equating to the most recent or top selected value only and not "all selected values" when writing output.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I can't find an example to show with a history/listing of what versions of ASP.Net are supported by which versions of Internet Explorer but...

I would think that the issue you are having is that IE5/6 are both heavily outdated versions of IE and likely are not capable of handling the newer version of ASP.Net that you are utilizing in your form.

Why anybody would still be using IE5/6 is beyond me as it's a free upgrade to get newer versions and Firefox is better/more stable anyway :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, way to steal my thunder Ketsuekiame :twisted:

You covered all the stuff I'd have said and more in most areas.

What I would add is that (again, depending what direction you are going to take) it seems that a lot of game developers are tending towards a combination of scripting languages and either C++ or Python for the bulk of their coding needs. As indicated above, C# is good if you're doing web-apps in ASP.Net or if you're doing basic windows forms but it lacks in flexibility and power over C++ and requires a larger resource overhead to run apps written in C#.

Ketsuekiame commented: Definitely good to mix low level languages and scripting lnaguages +1
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

This resource at msdn.microsoft.com might be of some help in getting a bit more familiar with the methods you are trying to use.

I assume that you are using a browser front-end on your application or else you won't be able to utilize the httpRequest processes as they rely on browser input for their values.

Not really sure about the MachineName bit but I'm sure msdn.microsoft.com will have some info there for that as well.

Hope this helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Question: Do you have a method in place to clear the textBox between button clicks?
Question 2: Are you trying multi-selections after trying single selections?

I generally would include a Label1.Text = ""; line prior to populating the Label1.Text (prior to the ForEach statement) to ensure that there are no previously entered values already present in the label prior to being filled with 'new' data.

Unless you have listbox items with identical values the only thing I can think of is that you're adding your list of selected items to an already present single selection.

Hope this helps :) Please remember to mark the thread solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok, Umm... If you have SQL Server Management Tools available for you for the DB you're working on do this:

  1. choose the Date_Registered column within your table
  2. Column Properties > General > Default Value or Binding
  3. Enter "getDate()" (without quotes)

It may give you some grief over the fact that prior fields may or may not be already filled in but it will achieve what was suggested by mono.

Alternately, as this is now several days old and it's still not doing what you wanted it to do why not just give up on that if you can't figure it out and instead have the date generated on the application side and inserted at the time of the record being sent like I originally said :)

Either works, mono's method works behind the scenes and without fuss but you seem to be having difficulty implementing it.

See, this is what happens when I buy a new game and take a few days off DaniWeb :twisted:

AngelicOne commented: nice comeback.. xP +1
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Which was essentially the same as what I had given with the addition of "click the button that says Threads that I've started" which doesn't add any new subscriptions or alter the way subscriptions are handled :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It's not a subscription option... What Dani's pointing out is that there are links in your profile page and at the bottom of the page (footer) in DaniWeb that allow you to (with a single click) bring up a list of all the thread starting posts you've ever made.

To subscribe to them you'd still need to either manually do so or set a global setting that would affect both yours and replies as I mentioned in my reply to your original post :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Control Panel > Edit Options > Default Thread Subscription Mode

This setting decides how your default subscription settings affect all posts you make.

Generally it affects both new threads started by you and replies posted by you so unfortunately you can't have the best of both worlds (auto-subscribe to your own threads while not subscribing to threads you reply to) but that's where the setting is.

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Just skimming through posts here - really think someone should write a code snippet with all of this in it. Very good material and explanations here!

Done :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

As suggested by Duki in this thread I figured I'd compile all the workable examples and explanations here towards the question of "Why do we use get/ set to change properties?"

Properties provide the opportunity to protect a field in a class by reading and writing to it through the property. C# properties enable this type of protection while also letting you access the property just like it was a field.
Becuase of get /set our class contains control over the input.
let say E.g. if you don't need to use get/set. you colud write function for setfunct or getfunct insted of using Property.
But that's a real problem like -- you'd rather write myc1.Y = 3; and be able to write things like myc1.Y += 5; , instead of myc1.SetY(myc1.GetY() + 5); //where myc1 is a object of class. So instead C# has properties.
Inside the setter, the keyword 'value' is the variable containing the value that is getting assigned to the property setnumberY.

Reason we use properties is it's a virtual.Another benefit of properties over fields is that you can change their internal implementation over time. With a public field, the underlying data type must always be the same because calling code depends on the field being the same. However, with a property, you can change the implementation. For example, if a customer has an ID that is originally stored as an int, you might have a requirements change that made …

finito commented: good work +2
ddanbe commented: Just noticed it. Well done! :) +7
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm curious which compiler/IDE you're using for your coding because I know my VS tells me exactly where the error is when it pops an error out at me.

Alternately the only way you'll be able to tell if your compiler/IDE isn't being helpful, would be to go through each page of your code and look for references that match those given in the error (good old "find" option).

Obviously somewhere in your code you defined "Ticks" outside of the allowable range as set by "DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks" so I would start with a 'find' of "Ticks" and go from there :twisted:

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, for starters you're not going to be able to 'hide' query string values because they appear in the presentation of the URL and there's really no way around that.

What you can do however, is find an alternative method of passing the values from page to page. Possible methods include passing the values within a cookie or some other codeable process.

Even if you had a method to obscure the URL being called it's still going to show the query string. Even if you find a way to obscure the query string in some browsers it won't necessarily work in all browsers :) If you truly don't want users to see the values passed then use a more invisible method to pass them (but there will always be ways to see them if the users REALLY want to).

On the other hand, if the values being passed are formatted in such a way as to make no sense to the end user but make perfect sense to your programming then what's the harm if they see them.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, I have to say I've never seen z-index:100 used before...

Really not sure what you're working at there but just remember the higher the z-index the further forward it is from the back of the stack... higher = 'on top of' lower... as long as whatever you want to appear behind has a lower z-index than whatever you want to appear in front you've got it half way there.

That being said, if you have the other positioning incorrect, it doesn't matter at all what z-index the item is at if they aren't told to sit on the same spot :twisted:

Best of luck sorting it :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Just curious, how can it be the css if all of the pages are working correctly?

for some reason the page will not display at all on ie7 or ie8, Firefox works fine

One area in which IE differs from Firefox (and many other browsers) is in it's handling of CSS properties. Many CSS properties (or more specifically formattings) that work properly in Firefox and other current browsers are not yet supported by IE as they are 'proposed CSS3' methods that are not yet standardized and therefor not 'required' to work in all browsers.

This does not, however, prevent some WYSIWYG editors from utilizing these methods in their drag-n-drop design or prevent authors from implementing them within their CSS pages. A common result of this is an incompatibility with IE browsers leading in either unexpected behaviour or (as you are experiencing) nothing showing in IE due to misinterpretation of CSS formatting.

Again, it may not be your CSS but I mention it only because in an alarmingly large percentage of site content failures where 'only IE is affected' the cause can be found there.

Hope this helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

>>Did you use any "drag and drop" softwares? If so, please dont.

Not that there's anything wrong with WYSIWYG (What You See Is What You Get) web development platforms (like Dreamweaver and such) but they do tend to do a mighty fine job of cluttering your HTML and making it hard to find problem areas :)

I generally use my Dreamweaver only for the barest outline of the page (or template) that I want to use and for coding things like mouseover buttons (because I'm too lazy to write the javascript myself) but beyond that I manage the rest of my HTML (and ASP.Net) coding manually and simply use Dreamweaver to view the results in assorted browsers.

This tends towards cleaner code (if you're practiced at it) than the drag'n'drop alternative of building the page with all built-in-functions within your WYSIWYG editor since many editors get overly verbose with their addition of otherwise simple code snippets.

That being said... if you're generating that many errors on your page then it goes much deeper than just redundant WYSIWYG editor code and you will probably spend a great deal of time over the next couple of days having to dig through your components one by one to sort the issues.

I still hold to my original statement that you may want to investigate your .css file as a potential source of cross-browser compatibility issues as it is very often the source of otherwise invisible (in the HTML) …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'll be honest, I looked through a lot of information to try to find an answer for you and I can find many references on how to load the .pdf into your page or to embed it into the page so that it's not having to be downloaded and separately opened in acrobat reader...

But I can't find anything about opening to a specific page...

That being said, you might want to look into this option which utilizes ActiveX controls provided in-part by adobe for browsing .pdf files and those controls may provide a method for directly accessing a specific page (but may not, I didn't download them and try them).

Hope this helps :) Please remember to mark threads solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, welcome to the forums and hope you find an answer to your issue :)

I might recommend that you attempt a thread in the Windows NT/2000/XP forum as someone there might be able to help you solve your issue.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Sorry, I need to get a bit more info out of you...

When you say "open a window on the same page" to what are you referring?

Yes, Response.Redirect will make a call to the browser to go to the new URL provided similar to clicking a link in a webpage would.

If you are trying to have the contents appear as a subset of the page that you are showing the rest of your content in you may need to look into frames or dynamic display methods available via ASP.Net (panels, divs, etc).

I'm sorry if I'm not understanding what you're looking for but the concept of a Response Redirect effect that doesn't redirect to a new page's content is not clicking for me at the moment :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

http://validator.w3.org/check?uri=http://lostangelsproject.com/&charset=(detect+automatically)&doctype=Inline&group=0

On Line 409:

<div id="background"><img src="http://lostangelsproject.com/wp-content/uploads/2010/07/JodieComp_1152x864.jpg" alt="field" style="width: 100%; height: 100%; background-repeat: no-repeat"/></div>

What is no-repeat by itself? It makes no sense!

Actually it indicates "style="width: 100%; height: 100%; background-repeat: no-repeat""... looks like they're trying to combine css style formatting with html style formatting which is fine for most browsers but not necessarily all.

From what it's showing there the intent was a single image set to 100% width and height of the page with no repeat.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Actually he did. He posted the link to his website and well you should know how to find the css file from there!

Semantics hehe I got lost in the wall o' code on my way down to the reply section and didn't feel like scrolling back to the top again :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

On a side note... one thing to be aware of is that a very large number of cross-compatibility issues between MSIE and other browsers is generated by the CSS file and the settings therein. Thankfully you provided us with the contents of the CSS file you were.... oh wait, no, you didn't :twisted:

Edit: Agree with djextreme5, not liking scrolling for days to get to the end of a code wall :) If you feel the need to share an entire file's worth of information best bet is to compress it (and any related files such as the .css file) into a .zip file and upload them as attachments to your post :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

On my computer it seems to take longer to load on the page loads where it shows the front view of the Blizzard-XI (the one with it pushing the soccer ball) than when it's showing the side/back perspective.

Hope that helps in some way :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

As I indicated in my reply to your other (misplaced in C#) post, it would be helpful to those who are trying to help you out if you would provide some additional information.

1) Would you be able to post here any errors you are receiving so we can perhaps figure a general area that the problem may reside in
2) Would you be able to post here any code related to the area you are having difficulty with (that would be the INSERT/UPDATE segments in comparison to your 'working' SELECT segments)

Believe me, I wish I could read minds because then I'd have a lot more money than I do but without that handy ability I still require people to give me information to work with before I can produce results :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

And Lusiphur ... the code snippet made me laugh! Thank you for that. It was a nice relief from my frustration of the last couple of days. :)

No problem :) That was kinda the point of it hehe. I'm just amazed it got it 'right' considering how tired I was. On the bright side, I went and had a nap so I'm feeling MUCH better now :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Keeping in mind that my Red Bull function appears to require a higher value of sleep than I've input... (I've had 2 hours sleep so I'm a bit groggy)...

Might I ask where you're setting your classes up for your win-app? Are you doing so in the program.cs or the formNameHere.cs file?

int alertness = RedBull(sleep, ml)

public int RedBull(int sleepHours, int canSize)
{
    int alertness = 0; //Range 1-10
    if (sleepHours < 5)
    {
        alertness = 1;
        return alertness;
    }
    else
    {
        //insert crazy complicated calculation based on sleehours and canSize
        //return alertness more appropriate to answering questions
    }
}
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome Luke, glad to have you here.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Oh wow... I even missed 2 when I was actively trying to reply to all new member intros... sleep is more important than I thought lol

Welcome though :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

The Filtertext fuction, how will i access that as i suppose this will be in another class.

If you are following farooqaaa's suggestion it doesn't need to be in another class, it can be a function within your main program and therefor doesn't require an instanciation of a new class to perform. Simply insert the function within your code outside of your other functions and call it as required in the way that farooqaaa indicated.

All *I* was saying is that it is POSSIBLE to create it as a function of an external class, not that it was better to do so. Unless you have a specific purpose or need for separating it to an external class it would be easier/better to simply include it in your main program area.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Hmmmm, ok, I thought the idea behind a static class (remember, I'm still learning) was; you don't have to instance it, and that you shouldn't.

No, you and farooqaaa are right, this would be a prime example of my brain going into 'standby' mode right in the middle of my Red Bull cycle :P