Click here to Skip to main content
Page 1 of 8
Page Size: 10 · 25 · 50


Tag filtered by:  string [x]
Answer 12 May 2013   license: CPOL
Rather than string array, use List(of T)[^] generic class, which provide functionality for search, sort and manipulate list. Follow the link to find an example.
Question 12 May 2013   license: CPOL
Hello EverybodyHow can store name of dynamically created checkbox in a String array when I don't know how many checkbox will user select at runtime.Say I have 10 dynamic checkboxes and out of 10 user select 6 checkboxes randomly now how can get the name of those selected checkboxes and store...
Answer 8 May 2013   license: CPOL
This is not possible with strtok because this function inserts a NULL character at the end of the token.You could do the following to get what you want - pch = strchr(TempStr, ' ');pch = strchr(pch + 1, ' ');pch = strchr(pch + 1, ' ');pch = strchr(pch + 1, ' ');Another thing I...
Question 7 May 2013   license: CPOL
Hi guys, this morning i got this prorblem while parsing my text file.I have simple code to parse string is as follow,const char* LastLineOfFile = FinalExecutionOfJob[NumberEntriesInLastExecution+1];char * pch;char* TempStr = strstr((char*)LastLineOfFile,""); const char*...
Answer 29 Apr 2013   license: CPOL
I can see couple of problems in your code, where to start? Prevent query from SQL injections, like Keith Barrow pointed out.Use SqlCommand.Parameters Property[^] instead of string concatenation. You are loading value of template column, wich is of type NVarChar(n) (String) into usr...
Answer 29 Apr 2013   license: CPOL
in this Line: bytes = usrThis is the fullcode Private WithEvents verifyControl As DPFP.Gui.Verification.VerificationControl Private matcher As DPFP.Verification.Verification Private matchResult As DPFP.Verification.Verification.Result Private allReaderSerial As...
Question 28 Apr 2013   license: CPOL
I having problem with my code. i'm developing a login page with fingerprint scanner. Inserting the template of fingerprint scanner to sql database works fine (nvchar(MAX)),but when selecting the template from sql im getting error like this: Unable to cast object of type 'System.String'...
Article 21 Apr 2013   license: Ms-PL
MatchKit is a .NET Library that provides a set of classes to build patterns to match simple and complex strings
Answer 18 Apr 2013   license: CPOL
Copying one gridview to another gridview data dynamically in asp.net C# protected void Button2_Click(object sender, EventArgs e) { DataTable dt_vilas = new DataTable(); //dt_Grd.Columns.Add("name", typeof(string)); for (int i = 0; i
Answer 16 Apr 2013   license: CPOL
Hi , use can use it txtToDate.Text = "4/23/2013"DateTime date = DateTime.ParseExact(txtToDate.Text, "M/d/yyyy", null);date return {23/04/2013 00:00:00} txtfromDate_new.Text = date.ToShortDateString();Out Put is txtfromDate_new.Text = "23/04/2013"if you wants date...
Answer 14 Apr 2013   license: CPOL
Hi, Use CompareValidator to check it client site.This will check it client site and save round trip to server.
Answer 14 Apr 2013   license: CPOL
Dear C# has predefined function to check if the entered character is digit or alphabet on keypress event.//consider following code to get your problem resolvedPrivate void textBox1_KeyPress(object sender, KeyPressEventArgs e){if (char.IsDigit(e.KeyChar)){//your code here}if...
Technical Blog 13 Apr 2013   license: CPOL
Background Say we have a registration table which store successful registration info. At that table we have a column “Name” which stores value as combination of first name & last name delimited by ‘ ‘ [space]. Later at some point we need to extract the first name or last name
Answer 12 Apr 2013   license: CPOL
void textBox1_KeyPress(object sender, KeyPressEventArgs e){if (!Char.IsDigit(e.KeyChar) && e.KeyCode != Keys.Back ){e.Handled = true;}}
Answer 12 Apr 2013   license: CPOL
also try this code..it will accept only int valueprivate void textBox2_KeyPress(object sender, KeyPressEventArgs e) { if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), @"^[0-9\b?]$")) e.Handled = true; }
Answer 11 Apr 2013   license: CPOL
You can validate that in javascript. Use the following code. function Validate() { var txtValue = document.getElementById("MainContent_txtTestBox").value; var checkFlag = isNaN(txtValue); if (!checkFlag) { return...
Answer 11 Apr 2013   license: CPOL
Hello,Here is a example directly taken from MSDN. You will have to modify it a bit to suite your needs,// Boolean flag used to determine when a character other than a number is entered.private bool nonNumberEntered = false;// Handle the KeyDown event to determine the type of...
Question 11 Apr 2013   license: CPOL
I've a textbox in my forum and I want user to enter only int values if(textbox1.text==int){\\Calculations}else{\\Error}
Answer 11 Apr 2013   license: CPOL
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
Answer 11 Apr 2013   license: CPOL
1. what do you mean- wrong result? 2. I just tried to run:std::string readBuffer = "dgsdg sdfgsd sdfg ds fghhsdfgsd dfgd sdg dfgdg dfg ghdfh sdfg";std::string starttag = "";std::string endtag = ""; size_t sstart;size_t send;...
Answer 9 Apr 2013   license: CPOL
My immediate thought is that there is some conflict between the string types in the implementation of ConnectionInfo and your piece of problem code.I shall presume they are both std::string. If the ConnectionInfo implementation is provided as a binary (either static or dynamically linked)...
Question 9 Apr 2013   license: CPOL
Hello, i have a problem with assigning string to string field in my structure. Here is structure: struct CIMUNTYPEDFRAMEWORK_API ConnectionInfo { AuthMethod authmethod; string certificate; bool local; string oid; string host; int port; string username; string...
Answer 5 Apr 2013   license: CPOL
It is probably the InsertColumn call that is spoiling your game. At the second call of displaytext you insert a new column, thereby shifting the existing column to the right and out of view. That is why you don't see the first value any longer.Place that InsertColumn call in your dialog...
Question 5 Apr 2013   license: CPOL
Hello people all welcome. I hav started my career in windows programming.I am doing an project in SDI. I have two functions name sendtext(CString str) and displaytext(CString inr) both in different class.I have a pointer name pView to send the string str to function "displaytext".The...
Answer 29 Mar 2013   license: CPOL
You might create a class, say Replacer:class Replacer { std::map replacement;public: Replacer() { // init the map here replacement.insert ( std::pair("C#","C++") ); //... } void replace_stuff(std::string &...
Question 29 Mar 2013   license: CPOL
Hello, everybody, this is my first question, so please notice me if it's something wrong with this.I want to replace some words without using boost libraries or other .hpp's.My first attempt was to make a copy of the string, and it was quite inefficient. I'm not very proud of it, so I will...
Answer 27 Mar 2013   license: CPOL
You cannot replace anything in a string, because this type is immutable; all string functions returning string create a brand new string object. Including String.Replace.All you need is this: http://msdn.microsoft.com/en-us/library/system.string.aspx[^].And this is what your need much...
Question 27 Mar 2013   license: CPOL
Hello Everbody.Please help me for question of StringI have one String.Eg: truon@gtm"abc "@fdfdm" longhgI want replace " character that it between @ and " " character( it is close very to " " character)Bellow:input: truon@gtm"abc "@fdfdm" longhgoutput: truon@gtm"abc "@fdfdm9...
Answer 18 Mar 2013   license: CPOL
Solution - make sure the string is in the correct format.
Question 18 Mar 2013   license: CPOL
Input string is not in correct format. if (e.Row.RowType == DataControlRowType.DataRow) { if (Convert.ToInt32(e.Row.Cells[2].Text)
Answer 18 Mar 2013   license: CPOL
you write this code and it always redirect on testpage.aspx with querystring of current button text protected void InstallChecklist_2WA_Click(object sender, EventArgs e) { Response.Redirect("tespage.aspx?InstallName_2WA=" + ((Button)sender).Text); }
Answer 18 Mar 2013   license: CPOL
Hi Dustin Prevatt,i did not get your point with your pasted code becuase you have mentioned an event code behind but its not referenced in datalist html so will you explain your issue in detail that what you want?
Question 10 Mar 2013   license: CPOL
HeyaI got a long string from a HTML request. I need to find the following substring within: However when I'm trying to search it gives me wrong results.If I replace the string with something, not containing "" it works flawlessly.Relevant code:(not copied,...
Answer 6 Mar 2013   license: CPOL
I'd use a Regular Expression. \$\(F\(\"(?'X'[^\"]*?)\",\s*\"(?'Z'[^\"]*?)\"\)\s*\)But you may want more flexibility.And we have a Regular Expressions forum here as well.
Answer 6 Mar 2013   license: CPOL
www.txt2re.com can be used to generate a Regular Expression and provide the code to execute the Regular Expression match.This is one that I created using txt2re to extract xxx (word1) and zzz (word2). Depending on the variability in the format of your source string, you may or may not have...
Question 6 Mar 2013   license: CPOL
Kind of a brain freeze question (I'm planing a much anticipated vacation).I have a string like : $(F("xxx", "zzz") )I need to extract xxx and zzz.I could do it manually, but I'm certain there is a better way.regular expression ? or something else ?Contrary to other, this...
Answer 4 Mar 2013   license: CPOL
These are standard template solutions:#include #include #include // Checks if a std::string can be converted to a type T.template bool Is(const std::string& s){ T value; std::istringstream is(s); is >> value; ...
Answer 3 Mar 2013   license: CPOL
There are built-in functions like atoi, atof, atol and so long. By using this function you don't need to care of restictions: the given string will be converted or you get zero back!Take a look at e.g. atoi:functionatoiint atoi (const char * str);Convert string to...
Question 3 Mar 2013   license: CPOL
Hi everybody, I am new in vc environment. Is some one suggest me how I validate the numeric string? My requirements are as follows:a)numeric string have negative numbers.b)range is from -1000 to 1000.Currently I do the following things:a)remove leading zeros.b)remove special...
Answer 28 Feb 2013   license: CPOL
Thank you for your quik answears. The file looked like this:Name  Olof I wrote the code like this and its works perfect.public string getMeetInfo(string fileContent , string searchMeetInfo){ ...
Answer 28 Feb 2013   license: CPOL
Well I think you should take Uday's suggestion into consideration but if you must read it from text file:List lines = new List();if(File.Exists(path)){ // Read the file and display it line by line. System.IO.StreamReader file = new...
Answer 28 Feb 2013   license: CPOL
this is not question this kind of assignment please send me file i will write code and send to you.
Question 28 Feb 2013   license: CPOL
Hi! I'm quit new to C# and I resentle stucked with some code and I would be very pleased to get some help.I want to be able to take out a line from a .txt file with just knowing what the text is on the line above. For exemple:Name:OlofLastName:WikingCountry:SwedenAnd for...
Answer 13 Feb 2013   license: CPOL
You could make use of the C-library string manipulation routines[^].
Question 13 Feb 2013   license: CPOL
Hi All, I am MFC(VC++) programmer :-).So while dealing with string i used CString class that provide me all string manupulation routines.So strong class having all thing that needed to manupulate string. :-). But now my software architecture restrict me on only C++. anable to...
Answer 7 Feb 2013   license: CPOL
It referers to the variable (zero-)index in params.Console.WriteLine("{0:C} {1:C} {0:C}", 1.2, 1.5);will output:1.2 1.5 1.2Good luck!
Question 7 Feb 2013   license: CPOL
To display a number with its associated currency symbol and the appropriate number of decimal places we use the currency character “C” or “c”, like:Console.WriteLine("{0:C}", 1.2");The number 1.2 appears in the output like this: $1.20.my question is what does "0" indicates in {0:C}??
Question 1 Feb 2013   license: CPOL
How do I create and add to a 2 dimentional list in vb.net?

Page 1 of 8
1 2 3 4 5 6 7 8


Advertise | Privacy | Mobile
Web04 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid