Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome and all that jazz :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Perhaps if you gave a bit more detail...

Such as, why are you connecting to the database? Are there dynamically loaded objects in your site that require DB access? Are you sending information to the database from inputs on your site?

Do you have any knowledge of ASP.Net or VB or any other web-compatible programming/scripting languages for that matter? Is the database local to the site or on a server somewhere?

All of this information would be handy for someone to be able to better evaluate the question you are asking and to allow people to provide the correct type of help to fit your needs.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Its not even letting me include System.RegularExpression.

That's because I'm an idiot and it's supposed to be:

using System.Text.RegularExpressions;

Note to self: double check some stuff before posting on-the-fly :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

This might work for your needs... you'll need to add "using System.RegularExpressions;" at the top of your code and this goes into your button click:

Button btn = (Button)(sender);
string btnName = btn.Name.ToString;
string[] btnSplit = Regex.Split(btnName, "button");
string btnNum = btnSplit[0];

btnNum will be the number portion of the button name of the button that called the click event.

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

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

For 2d based games, a scripting language is the going type. For 3d and serious graphics based games C++ and some scripting languages such as Lua works great.

Thanks. I was getting the opinion from what I was seeing in job postings under requirements that C++ was the more commonly used language but I'd also seen Python mentioned as well and both by large game producers (read: Blizzard and Funcom).

Now, correct me if I'm wrong, but coming from a C# background I really shouldn't have TOO much difficulty transitioning to C++ should I? I mean, from what I understand the most glaring differences are resource management and the managed/unmanaged code difference.

Thanks again for the feedback, just trying to get a handle on what I'm looking at so I can better plan my educational pursuits to match my goals.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Sorry, I only have a general knowledge of Java2, a very basic knowledge of JavaScript and I'm not a teacher. Plus, this is a community introduction thread, hardly the place to ask for guidance and teaching in a language I've not even mentioned a knowledge or interest in :)

As a side-note, please review the rules regarding the inclusion of email addresses in your posts :)

Sorry I couldn't be more help for you, I encourage you to check Google for online coding resources for Java and if you get stuck with code that you're developing that's not working as expected I'm sure the folks who read the java forums would be happy to help.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

nyb = not your business or None of Your Business :twisted:

Kale is basically a type of lettuce/cabbage used in various types of salads... I think (if it's the one I'm thinking of) it has a slightly bitter flavor to it.

Oh, and welcome 4delite!

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Heya macgurl :) Seen you around the forums, you've got some of the most detailed and insightful posts I've seen. Glad to have you here.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm sure that forms of this question come up from time to time and it's a very subjective question that has the potential to generate some semblance of debate but here goes...

Having looked into a future career in game development (back-end coding as opposed to front end UI and graphics) I've come across various listed language requirements when looking at companies that produce games for various platforms.

My question is this, coming from a C# background as I do and looking to get into game development, which would be the best language to look into learning?

Some companies appear to favour Python, some appear to lean towards C++, many won't even consider you unless you have a working knowledge of DirectX. So with the DirectX requirement and the C# background, which language would you say is the better to approach? C++ or Python? And why would you consider the one over the other?

Looking forward to your feedback on this :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

All hail Dark Helmet!!

Oh and welcome :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

On a side note, in case anyone's wondering about my alias, Lusiphur, it's not as obvious as it may seem :twisted:

It's based on this, and I've been using it since early high-school as an online moniker.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well... let's see...

Function:

// creates a public procedure named AssignIt which takes an input string and internally refers to it as str as well as having a return property of string (meaning it sends a string result back to it's caller)
public string AssigningIt(string str)
{
    //Some statements here...
    AssignIt = str; // assigns string value of str to the AssignIt method
    return AssignIt; // returns the current value of AssignIt method to the caller
}

and the other looks more like a method:

private string assignIt; //creates a private string called assignIt

    public string AssignIt //Defines public method AssignIt
    {
        get
        {
            return assignIt; //set get value to return private string assignIt
        }
        set
        {
            assignIt = value; //uses calling string to assign value to assignIt
        }
    }

However, again, what I just demonstrated is a method, not a subroutine. I've actually never come across the concept of subroutines in C# myself, just methods and functions.

In looking for some more details on subroutines in C# I came across this which might help.

You might also find this reference a help in your attempt to go from VB to C#.

Hope this helps :) Please remember to mark as solved once your question has been resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I just don't understand the 'I must have a gun' mentality. I'm sure that I'd be more likely to be shot if I carried one. Is it that carrying a gun is a civil liberty? Is that why many are so touchy about the chance of an 'inanimate object' being banned?

Not to say this applies to "all Americans" but it does apply to many of the gun lobbyists... The general argument is that it is within their rights as outlined in the constitution to have the right to bare arms in defense of their homes.

What many tend to ignore/omit in their mantra is that this right was established to provide a legal basis for the formation of an "organized local militia" in defense of their lands and property against foreign invasion (most notably from the then king of England).

In today's day and age this "right to bare arms" is well past obsolete but thanks to the founding fathers including it in the original bill of rights provides so many people such a strong point of leverage as to make it nearly impossible to repeal now.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Simply because there's a few different ways you can accomplish this in CSS I'll toss you this link here to a search where the top 3-4 results should be able to help you through that.

Hope this helps :) Please remember to mark as solved once your issue has been resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Control Panel > Edit Signature :)

In there you can put a formatted block of signature similar to what you might do in a mail application like Outlook or Thunderbird.

Hope that helps :)

Edit: I'm only snappish when I see little-to-no effort made to solve issues because people don't learn if they have all their problems solved by others without even trying to research it themselves. So if you've shown effort don't worry about me jumpin' down your throat :) ((in relation to "Yes, I tried to solve it myself!"))

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to both of you :)

Hope you enjoy the community here as much as I do and that your stay is long and productive.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Dude, calm the rant and read the rules :)

One of the rules (which are accessible via a clearly visible link above the search bar on the upper right of the page) states "Keep It On The Site" and in defining that says "Do not manually post "fake" signatures in your posts. Instead, you may create a sitewide signature within the user control panel."

The immediately following rule states "Keep It Spam-Free" which is expanded to include "Do not spam, advertise, plug your website, or engage in any other type of self promotion."

Essentially, all the moderators did was to follow the posted guidelines in removing from your posts the components that violated not 1, but 2 of the posted forum rules. It happens from time to time, you learn from it and move on... ranting at the moderators isn't going to change the rules or how they're enforced any time soon :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

You can create an entire website derived from C#/ASP.Net coding but you will need to have a strong working knowledge of HTML and possibly some of the other scripting languages out there like JavaScript and such to make some components work the way you want them to.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

There is lots of information out there regarding C# as well as ASP.Net(C#) including tutorials and even classes you can take.

You say you asked a teacher about C# and all they told you was the .Net stuff... if that's the case you now know about the more common usage of C# coding in the workplace today. C# can also be used for desktop application development, however it's notably higher resource footprint over unmanaged code languages makes it somewhat less desireable for this.

What I recommend, look on msdn.microsoft.com, look on google.com, talk to your teacher again and if you're REALLY interested in learning C# or ASP.Net take a course in it.

Hope this helps :) Please remember to mark your thread solved when the issue has been resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It is better to use the generic List type:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            List<string> MyList = new List<string>();
            MyList.Add("p001");
            MyList.Add("p002");
            MyList.Add("p003");
            for (int i = 0; i < MyList.Count; i++)
            {
                Console.WriteLine(MyList[i]);
            }
            MyList.Remove("p002");
            Console.WriteLine("#################### After removing:");
            for (int i = 0; i < MyList.Count; i++)
            {
                Console.WriteLine(MyList[i]);
            }
            Console.ReadKey();
        }
    }
}

Also known as a "Collection" and darn you for getting up earlier than me and mentioning it first :P

But yes, your best bet is what ddanbe said as it dynamically increases it's size as items are added to it and can have items removed from it, reducing it's size dynamically, without having to insert null values as placeholders to overwrite them.

Don't forget to mark the thread solved once your issue is resolved :)

ddanbe commented: You got to live in Belgium ! :) +7
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Whichever works for you, as I said it's just a matter of parsing by one value to get results 0 and 1 and using those to fill your data destinations.

Don't forget to mark the thread solved when you're done :) Good luck.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Just one last thing. It's about #content. There is a height:500px; value. Is it possible that div content determines it's height automatically based on the amount of text inside of it ?>

To be honest you can almost consider that height value to be a "max-height" value because a div's height is determined by the amount of content it contains(with the exception of "absolute" positioned divs).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Unfortunately what you got from me before is about as good as I can do at the moment, sorry :( Maybe someone else will be more insightful than me but I'm off to sleep.

Good luck though :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

There's nothing wrong with having multiple adapters so long as they're differently named and you duplicate the remainder of the components below the adapter in the data retrieval process with different names than the first set (ie: command, dataset, etc).

Alternately...

If the 2 queries are similar but with one or two differences (ie: same subset of data but with different conditions on the WHERE portion) you can just have a dynamically populated SELECT string and run the ONE set of everything twice with 2 different values... the only thing you'd have to do then is ensure that the population portion (where the data gets put in your form) is separated and the SELECT string is swapped between the reads.

For Example (just gonna use pseudocode for this):

string sqlSelectString = "SELECT * FROM dbName WHERE conditionA";
private void dbConnecting()
{
--insert usual connection setup here--
sqlDataAdapter myAdapt = new sqlDataAdapter(sqlSelectString, connection);
--insert command and dataset population here--
}
private void getFirstPop()
{
    dbConnecting();
    --insert population of form fields from dataset--
}
private void getSecondPop()
{
    sqlSelectString = "SELECT * FROM dbName WHERE conditionB";
    dbConnecting();
    --insert population of form fields from dataset--
}

Again this is piecemeal pseudocode just to give the logic cus it's now almost 4:15am here :P

Hope it helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm not sure if it's what you want to do per-se but have you tried (when they choose to cancel) using Application.Exit() instead of just closing the forms? I assume if they cancel login you don't want the application running any longer.

Edit: What Farooqaa said :P (I stepped away for a bit and forgot to reload the thread to see if other answers were here before I replied)
Edit 2: And now, as it's 4am here... :zzz: Don't forget to mark the thread as solved once you're done resolving your issue.

farooqaaa commented: :) +2
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I just double checked, the furthest you can drill-down on a listView is:

listView -> Items -> subItems

Based on that, I'm going to have to stick with what I said before, my first loop checks each row (items) and my second loop checks each item in that row (subItems) and determines if one of those subItems is the button that called the click event. Once it finds the right button it reports back the row index (Items) and attempts to populate the outside textBox with the values of an item called "textBox2" within that row.

If that's not what you're looking for then unfortunately I'm unable to help cus even getting that much for you involved going beyond what I usually use a listView for (as I've never really gone to the level of subItems before).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

ok, I was assuming that the subitem was the button based on your originally suplied code snippet.

Basically I was looking at it as listView -> items(rows) -> subItems(components within the row) and so the code sample I put together for you gives you the row index based on the fact that the row contains the subItem of the button.

The logic for the looping still stands if you need to go down further in levels but I'm not sure how far down the levels go for what you're trying to do.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

You can disable the X close button on the login form. ControlBox = false.

I believe you can also code to ensure they can't do a right-click close as well but I'm not sure how to do that or if it's even necessary once you've disabled the ControlBox.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome :)

And where finito's basic is "pretty much extinct" mine hasn't been let out of it's box since... um... ((does some brief but complex mathematics)) a long time ago. :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It's getting late here, I'm tired, and I've never tried this before...

BUT...

I think this would work in C# to do what you're looking for assuming I got your variables correct (like textBox2 and such):

private void btnEquals_Click(object sender, EventArgs e)
    {
        Button btn = (Button)(sender); // declare variable btn as event sender
        int itemNum = -1; // declare int itemNum with init value outside of listView range
        for (int a = 0; a < listView1.Items.Count; a++) //Loop items in listView
        {
            for (int b = 0; b < listView1.Items[a].SubItems.Count; b++) //Loop subitems in listView
            {
                if (listView1.Items[a].SubItems[b].Name == btn.Name) // check for button within subitems
                {
                    itemNum = a;
                }
            }
        }
        TextBox tb = new TextBox();
        tb.Text = listView1.Items[itemNum].SubItems["textBox2"].ToString();
        tb.Visible = true;
    }

No guarantees, but I think this will work. And you might be able to reverse-engineer it to VB (for VB the statement "Button btn = (Button)(sender);" would likely evaluate to "Dim btn as Button = DirectCast(sender, Button)")

Hope this helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

And don't forget to mark the thread solved once you do get a solution to the problem. :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Try taking the second (CODE) out of the beginning of your code segment and add it at the end with a "/" in front of the "CODE" part.

Makes it easier to read the code snippet :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm curious which of my "work" you see more of lately... the helpful answers to well worded questions or the mild (as I can make it) statements towards the people who simply drop their 1-2 sentence questions into the forums without any indication of trying to solve them themselves. :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Glad to help :) Please don't forget to mark the thread as solved if this issue has been resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I don't disagree :)

And if you looked at the links I included they all point towards potential resources to find the information you need.

The one thing I would point out however, is that a single line statement is not generally a question that indicates any attempts on the part of the asker to have gained the information in any way other than to drop it in the forum and expect the answer handed to them :)

And to add to that sentiment, I took the liberty of looking briefly over some of the previous question types you've asked in the forums and many of them are asked in a similar vein "I want to do X, how do I do that?" without any indication of prior effort to find the solution yourself.

If you note, the phrasing of my initial response was somewhat couched in mild humor whereas I could have simply said "help yourself before you expect others to do the work for you."

I do hope the links I provided in my initial reply help you to find your solution :) Best of luck.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

You're looking to make your login form a modal form...

A Modal Form basically means that you cannot proceed with the program until the modal form's task has been performed and the form is removed by the program.

For more information on how to implement modal forms check this link.

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

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok, so I see your VB code there (and I'm sorry but I don't know VB much, I'm a C# guy) but did you read through any of the search results linked in my previous post? Because at least 2-3 of the ones on page 1 of that search should be able to solve your issue for you :)

Again, not being a VB coder I can't really help you past that. Good luck though.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok, you just went past the level of knowledge I can comfortably claim about dataGridView at 12:15pm while it's just starting to cool down from exceptionally overly hot out lol.

Gonna stop guessing and looking up scenarios now and hopefully someone more familiar with dataGridView will be able to help.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Again, the error message tells you what the most likely cause is:

>> Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Generally that would indicate an issue with the configuration of the web server (IIS) and so, if you're hosting it locally I might suggest looking into your IIS settings and if it's being hosted on an external provider you might want to check with them about their settings.

On a related note... unless you have specific components of your ASP.Net program that require all those extra settings you really can trim your web.config down to bare basics. Mine is this:

<?xml version="1.0"?>
<configuration>
	<system.web>
		<customErrors mode="Off"/>
		<compilation debug="true"/></system.web>
</configuration>

And the only segments I see of yours that appear in any way "vital" (or at the least, non-default) would be

<compilation debug="true"/>
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

Of the ones I just listed the debug one can be removed once your application is live and has been debugged fully.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Is this meant to be an ASP.Net web-form application or a C# windows-form application?

If it's a web-form application then:
1)It should have been posted in the ASP.Net forum
2) I'm not really sure how to get the value of the address bar if it's an URL outside of your site (such as google) but you can get the query string of the URL leading to your ASP.Net page (ie: www.yoursite.com?query=value by using

string myQuery = ClientQueryString;

If you're using a webBrowser control in a windows-forms application you can use the following to get the current URL from the webBrowser component but it'd be somewhat pointless since using a webBrowser component, the navigation would be based off another text input component of your windows form and you could simply get the info from there:

webBrowser1.Url.ToString();

Don't know if either of those help, the question wasn't exceedingly clear to me sorry :( Please remember to mark the thread as solved if it does get resolved though.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Sorry :( All out of ideas... all I can find is references to the fact that clicking on the header (triggering column sorts) generates 2 events... one destroying the datagridview content and the other recreating it in the new sort order... Apparently this affects the click event at the same time and causes your error.

Short of creating separate click event handlers to handle the difference between header click and non-header click (which I'm not sure where to start) I don't know if there's a solution to match your needs.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

While I don't specifically have a solution for this I did find this post elsewhere that gives some explanation of why it's happening and one person's description of how they worked around it.

I'll keep looking but I've not really done a lot of dataGridView work in the past.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Please provide some code samples of what you have already tried so that we can see where perhaps the problem exists in your code.

It's very difficult to troubleshoot where problems in code exist if code is not provided to troubleshoot from :)

If, on the other hand, you haven't tried any possible solutions prior to asking for the solution here, I would encourage you to do some research into what you're trying to do. :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Basically (if I remember my C# theory right) that's basically just the deconstructor for classes within your project.

Essentially when you drop something (close a form, exit the application, anything that ends the use of objects within the project) it calls for a disposal of that object.

The code snippet you've supplied basically says that when you call Dispose on an object it checks to see if there are any components active within the object. If there are it disposes of them first and then disposes of the object itself.

Basically just trash management :)

I could be completely wrong tho, been a couple years since I bothered reading the code theory part of my texts and that particular snippet is usually buried in the code-behind-the-code-behind :P

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Nick did a good job of coming up with the approximate formula used when deriving rep:


The entire thread here (Area 51).

Seriously... HOW did I miss that when I did my search? hehe thanks for that :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Hello, my name is Bariby and I'm a postaholic!

I've been addicted to postahol for going on 15 days now with no end in sight.

Thankfully, I'm also addicted to Red Bull and cigarettes so I've got lots of caffeine and nicotine to help me power through hours of coding, lurking, and answering questions in these forums :)

Unfortunately I'm currently unemployed and actively seeking to break into the software development industry but having little luck doing so. One of the hazards of having a low-level post-secondary education in something is that you become "over-qualified" for things like customer service positions and "under-qualified" for all but (non-existant) entry level programming jobs...

For something to pass the time (and hopefully build up my resume) I decided to make my own website (which is a continuing work-in-progress as I think of upgrades for it) and, while doing so, discovered DaniWeb... So here I am and now I'm your problem!! :twisted:

You'll see me most if you post in the C#, ASP.Net or Web Design forums as those are the areas I'm most familiar with :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

well if my first suggestion doesn't work, what about the 2nd one? :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm going to go out on a limb here and assume that the reason you've posted this is because you're looking for a solution for the error at the top...

It's pretty explicitly telling you the problem is with the following line:
>>Line 12: <connectionStrings/>

That being said, as there are no connection strings defined in your web.config file, you could easily delete that line entirely with no effect on your project (other than eliminating the error).

Generally, any section of a web.config file that serves no purpose doesn't even need to exist in the file. In your case that would include:
>> <appSettings/>
>> <connectionStrings/>

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

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Best I can do for you is ftp://forgeftp.novell.com/ldapcsharp/ldapcsharp/CsharpLDAP-v2.1.11 I couldn't use the url tags because it's not http:// hehe You'll have to copy/paste the FTP URL cus the forum keeps FORCING the URL tags around it and treating it as local to this site. Also, even though it's an "official" link from the folks at Novell it doesn't want to work for me so good luck to you.

Hope this helps :) Please mark as solved if it resolves your issue.