|
Yes your right do this
listbox.Items[index] = "blahblah";
Since a ListBox only uses strings the above should work.
Mike
You can do anything you want but you pay for everything you do!
|
|
|
|
|
Good Morning,
i have a problem!
i'd like to filter a dataset but return one dataset object and no one datarow object.
ex: DataRow[] dRow = dslocation.Tables[0].Select("text <> 'Any'");
i dont want it.
Please help me!
Thanks a lot!
|
|
|
|
|
You need to use a DataView. So something like:
DataView dv = dslocation.Tables[0].DefaultView;
dv.RowFilter = "Text <> 'Any'"
The rows of the DataView will exclude any row has a column text that matches 'Any'.
Hope that helps.
Ben
|
|
|
|
|
Thanks a lot, but i'd like to put this filters rows in dataset again, only filters rows.
thanks again!
|
|
|
|
|
Hi there,
Im sitting with some weird problem here, ok here goes:
Well i have a queries application and users select files from
a folder list and adds them to a customer they searched for.
The file they selected the file path with a subject and note gets saved
to the database.
Problem is that some times the exact same file path, subject and note gets
inserted twice into the database and some times 3 times.
I have searched line by line to find any possibility that the insert function runs more than ones
but it doesnt. the user select a file then enters a subject and note and then presses the capture button and the data gets inserted. My prodecure only gets executed once and it executes fast so there is no time to maybe click the button twice and even if they did i have a confirm box first before it executes the insert function.
Does anyone know what the problem might be? Pls
If you need any more info or code just lemme know.
Im programming in VS2005 C# and its a web application.
Thanks
|
|
|
|
|
Well, either the code is being called more than once, or there's a trigger on the database that also runs and does an insert. There is no other possible explantion, unless there's something weird in the SQL itself that can cause it to double insert, but that seems unlikely.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
A regular insert query doesn't add multiple records. The code is executed more than once, and the probable cause is that a user manages to send multiple requests.
Regardless of how fast the response time is, there is almost always a possibility to click the submit button more than once. After the page has been posted to the server, the page remains in the browser until the response comes from the server.
Put a script in the page that stops it from being posted more than once:
<script type="text/javascript">
var stopped = false;
</script>
<input type="submit" onclick="var s=stopped;stopped=true;return s;" />
---
single minded; short sighted; long gone;
|
|
|
|
|
How can I add this script to my page when I already
have the button click event from server side in the
onClick event in my asp code?
Am not very familiar with adding javascript code within a
server side C#/ASP.Net web application.
Thanks
|
|
|
|
|
Use the OnClientClick property.
---
single minded; short sighted; long gone;
|
|
|
|
|
I do like hardware interfacing through the USB port in Visual C # .Net before that I have interfacing to the Parallel & Serial port……but I think USB is too different .I don’t know that the how many numbers of bits in the USB ? and what is the disadvantages and advantages over the Parallel & Serial Ports? And what is reason behind the using of USB port? Can I get input from the USB and How?
I just want generate the 8-Bits signal through the USB in Visual C# .Net, like 00110010.
Please explain me and tell the some link related to the USB interfacing.
. Thanks!
|
|
|
|
|
How could I know, that a New mail is arrived in the account using POP3.
I m taking help of Pop3MailClient[^] article
Is there any POP3 command which will tell me that X number of New mails have arrived.
Please guide me.
"If our Mind can, the Program can !!"
|
|
|
|
|
i have encoded a string to ascii code like this
string s="123456*123456";<br />
byte[] sByte=Encoding.ASCII.GetBytes(s);
and i need to decode the sByte back to s string... i don't know how
need help please
|
|
|
|
|
string s = Encoding.ASCII.GetString(sByte);
|
|
|
|
|
|
Dear All,
PLease let me know how to check whether a specified character exists in a text or ? I am validating Password and I want to make sure that the password must contain atleast one numeric(0 to 9) , one special character and one uppercase letter.
thanx in advance
|
|
|
|
|
<br />
public static bool CheckForE(string s) {<br />
return s.Contains("e");<br />
}
Standards are great! Everybody should have one!
|
|
|
|
|
While
abc.Contains("0");
...
abc.Contains("%");
May work it will be too slow.
if(abc.Length > MIN_LENGTH){
char c;
for(int i=0;i<abc.length;i++){
c = abc[i];
if(!numberFound)
numberFound = Char.IsNumber(c);
if(!specialFound)
specialFound = Char.IsSymbol(c);
if(!upperFound)
upperFound = Char.IsUpper(c);
if(!lowerFound)
lowerFound = Char.IsLower(c);
if(numberFound && specialFound && upperFound && lowerFound){
valid = true;
break;
}
}
}
File Not Found
|
|
|
|
|
use substring to pull out each character in turn and if the character is of a type set a flag so you know you've found it. at the end all flags should be set and you're ready to go.
BTW you should also test for lowercase as you are assuming that Upper case is different from the norm.
Russ
-- modified at 10:01 Friday 30th March, 2007
|
|
|
|
|
Hi,
String.IndexOfAny(char[]) can check for the presence of any of a collection of chars.
and String.ToCharArray() may be useful too.
|
|
|
|
|
Hi evry1...this is my first post so excuse if there are any errors...
I want to create a small application which will enable me to save and create a file from the same dialog. for this i want to inherit the windows open or New file dialog and add radio buttons to indicate whether the file is to be created or opened.
Can u guys tell me how to carry out the task...i mean how to inherit the windows dialog and do changes to it...
P.S Im using Visual Studio 2005 and C#.net 2.0
|
|
|
|
|
I don't think you can inherit from it. You CAN write code that adds to the control tho.
This[^] is a good place to start ( first item )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello!
I have a problem. I want to create an Excel document programmatically in C# and then return it as a stream. This works fine if I save the document to disk first and then copy it into a filestream. But I want to copy it directly without saving it to disk first. Anyone who knows how to do this?
Thanks..
|
|
|
|
|
i have to make multilingual pages in asp.net.i made one pg in english and then copied its resource file to make another resource file for urdu.in the Initilize culture method it gives me this exception:
System.NotSupportedException: Culture 'ur' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture
Any suggestions / ideas would be greatly appreciated.
|
|
|
|
|
I'm not familiar to ASP.NET but i guess the problem is similar to a Standard WindowsApplication.
The cultureInfo is devided in three groups: invariant languages, neutral languages and specific languages.
Invariant languages and neutral languages can not be used as a language in a thread. You always need to define a specific language (in your case it should be "ur-PK").
The three groups of languages are build up like a tree.
invariant--- neutral A -- specific AA
| |-------- specific AB
|
|------ neutral B -- specific BA
|-------- specific BB
In case that the system can not find a "specific AA"-ResX it will fallback to a "neutral A"-ResX. If it doesn't find a "neutral A"-ResX it will fallback to the "invariant"-ResX. The specific languages are like dialects.
Localization is quite a complex theme and should be handled carfully. You can find a lot of articles in the internet and the MSDN. Take your time to read a few of them. --good luck--
greets snowprog
|
|
|
|
|
hi,
i am controls like combobox,date and time picker and radiobuttons..
Now i am saving the values of all controls in the form, through XML file.
and loading those values whenevr that form loads...
whenever I change the values and clicks on k the old values will be overidden..
I want old values and new values too...
Help me pls
With regards
prasad
|
|
|
|