Forum: C# May 22nd, 2008 |
| Replies: 3 Views: 1,092 you could also use
buyerName.Contains(TextBox3.Text)
buyerName.BeginsWith(TextBox3.Text)
buyerName.EndsWith(TextBox3.Text) |
Forum: C# Aug 13th, 2007 |
| Replies: 6 Views: 1,304 are you asking as the interviewer or interviewee? |
Forum: C# May 17th, 2007 |
| Replies: 10 Views: 31,206 you can't decrypt this. This is a one-way hash. It is the best way to handle passwords. You don't want to be able to decrypt them. |
Forum: C# May 3rd, 2007 |
| Replies: 7 Views: 5,403 sounds like homework. Show us what you have tried and then we can help |
Forum: C# Apr 17th, 2007 |
| Replies: 7 Views: 57,946 |
Forum: C# Feb 21st, 2007 |
| Replies: 5 Views: 16,521 select the info that you want into a datatable,
set the datatable as the datasource for the dropdown. call the databind function. and make sure you specify in the dropdown control which columns... |
Forum: C# Feb 14th, 2007 |
| Replies: 2 Views: 1,078 do you mean how to passs it to a function or how to write a function that accepts it?
function that takes one would look like this
private void test(char[,] b)
{
//do whatever here
} |
Forum: C# Feb 8th, 2007 |
| Replies: 15 Views: 18,780 that login code will leave you open to an sql injection attack. Never take input directly from an input and put it directly into an sql query |
Forum: C# Feb 7th, 2007 |
| Replies: 8 Views: 14,534 int intTemp = Convert.ToInt32(Console.Readline()) |
Forum: C# Feb 5th, 2007 |
| Replies: 1 Views: 4,739 select * from tablename where Cast(columnName as VarBinary) = Cast(@input as VarBinary) |
Forum: C# Feb 2nd, 2007 |
| Replies: 3 Views: 1,950 well thanks for posting that so I didn't waste my time |
Forum: C# Feb 2nd, 2007 |
| Replies: 3 Views: 1,950 other than the missing semicolon at the end of
e = true
this compiles and runs fine for me |
Forum: C# Jan 11th, 2007 |
| Replies: 2 Views: 7,271 kinda hard to tell, but what happens with your first example if there is an exception during someAction() |
Forum: C# Jan 11th, 2007 |
| Replies: 3 Views: 4,105 1) what are you trying to do? Add an option for every column in every table in your database?
2) again, what exactly are you trying to do, what have you tried? Are you trying to add all the... |
Forum: C# Jan 11th, 2007 |
| Replies: 7 Views: 10,723 what you probably want to use is a gridview (or datagrid, if your are not on 2.0) and bind it to the database |
Forum: C# Dec 6th, 2006 |
| Replies: 3 Views: 6,753 where are you getting the items that you put in the listbox? a config file? dataset? |
Forum: C# Dec 6th, 2006 |
| Replies: 1 Views: 1,294 what system? and search for what? |
Forum: C# Aug 14th, 2006 |
| Replies: 12 Views: 2,011 use +=
str1="1";
str2="0";
str1+=str2; //str1 is now "10"
str1+=str2; //str1 is now "100"
str1+=str2; //str1 is now "1000" |
Forum: C# Aug 14th, 2006 |
| Replies: 12 Views: 2,011 I don't really get what you are trying to do.
the way you have it, textbox 1 should have "10" in it and
textbox two should have "10^1" in it.
What are you wanting to have in the two boxes? |
Forum: C# Aug 7th, 2006 |
| Replies: 2 Views: 5,655 are all your licenses going to start with "LIC-" if so why not just put that part in a label outside the text box and only put the variable part of the license in the text box. Like when you see a... |
Forum: C# Aug 1st, 2006 |
| Replies: 3 Views: 3,992 you load the whole file and parse through it every time someone submits a word?
wouldn't it be better to load the list once when the program starts up? |
Forum: C# Jul 6th, 2006 |
| Replies: 10 Views: 31,206 yeah, sorry you need using System.Text also |
Forum: C# Jul 5th, 2006 |
| Replies: 10 Views: 31,206 actually you don't want to be able to decrypt it.
what you do is encrypt the password and save that in the database
when the user logs in, encrypt the password the input on the login screen... |
Forum: C# Jun 28th, 2006 |
| Replies: 5 Views: 2,358 you're missing the point, which is that you're sql query isn't going to work.
It is always going to return either null or "admin" |
Forum: C# Jun 27th, 2006 |
| Replies: 5 Views: 2,358 here, let me clean up your code so that it more cleanly does what you have it doing now
publicstring FuncAuthentication(string txtusername)
{
return "admin";
} |
Forum: C# Jun 27th, 2006 |
| Replies: 5 Views: 2,358 LabelName.Text = StringName; |
Forum: C# Jun 27th, 2006 |
| Replies: 4 Views: 2,236 sorry, bub, but that makes no sense because:
1) how is Page.IsValid supposed to know if the user is in your database
2) if you do already know that the user is valid, what is the point of this... |
Forum: C# Jun 26th, 2006 |
| Replies: 4 Views: 2,236 Here's a hint, what happens if your query returns 0 rows? |
Forum: C# May 26th, 2006 |
| Replies: 12 Views: 19,796 well sure, if you want to do it the easy way ;) |
Forum: C# May 25th, 2006 |
| Replies: 12 Views: 19,796 create a class called appointment with the appropriate fields.
create an array of appointments using your existing pc.xml
read in the new one and compare each new one to the ones in your array.
... |
Forum: C# May 24th, 2006 |
| Replies: 3 Views: 2,643 actually, I'm not 100% sure what was wrong with it the 1st time. it shouldn't even compile the way you had it listed. |
Forum: C# May 24th, 2006 |
| Replies: 3 Views: 2,643 try this:
if (textBox.Text == "")
labelResult = "Please enter a temperature to convert.";
else{
if (!radiobutton1.Checked && !radiobutton.Checked)
labelResult = "Please select a... |
Forum: C# May 23rd, 2006 |
| Replies: 3 Views: 11,048 whoops, yeah i was thinking you wanted a string. If you want a datetime, go with first reply. |
Forum: C# May 23rd, 2006 |
| Replies: 3 Views: 11,048 if you are sure those are the only 3 formats the date will be in, you can do this:
string strDate;
//pseudocode
// strDate = date from database
if(strDate.Length>8)
strDate=... |
Forum: C# May 19th, 2006 |
| Replies: 6 Views: 23,560 don't know if it will help or not, by I wrote a Sudoku Solver program in C# if you are interested |
Forum: C# May 18th, 2006 |
| Replies: 6 Views: 14,647 looks right to me. It also looks like you caught that you were counting 2 twice. Very good.
Also, minor detail but
if(IsPrime == true)
is kind of redundant
you can just use
if(IsPrime) |
Forum: C# May 18th, 2006 |
| Replies: 6 Views: 14,647 it won't work, because it is going to say the number is prime the first time it finds a number that it is not divisible by.
set the bool IsPrime to true, then go through the inner loop, if you... |
Forum: C# May 18th, 2006 |
| Replies: 6 Views: 14,647 Hi,
We don't mind helping with homework, we just hate when someone does absolutely nothing and just wants someone to do their homework for them.
What you posted is fine.
A couple of hints to... |
Forum: C# May 10th, 2006 |
| Replies: 5 Views: 2,530 |
Forum: C# May 10th, 2006 |
| Replies: 5 Views: 2,530 here, same result in 4 lines
private void SongTitle()
{
char[] strArray = SelectedFile.ToCharArray();
string result; = new string(strArray);
string[]... |