Public string ReplaceForCarriageReturnChar( string strInput) StrTmp2 = strInput.Substring(strTmp1.Length 2 ,strInput.Length StrTmp1 = strInput.Substring(0,tmpCounter) Public string ReplaceForNewLineChar( string strInput) StrAddress = ReplaceForCarriageReturnChar(strAddress) StrAddress = ReplaceForNewLineChar(strAddress) Search then populated by clicking the radio button:īefore submitting the data to the dataset, we need to revert back our changes. setValues(strAdd) : This function will populates the data in the TextBox StrJScript = strJScript " type=\"radio\" name=\"EmpID\" value=\"" strEmpID "\" onClick=" return setValues( '" strData "') "
StrData = strEmpID "|" strName "|" strAddress strData will used for populating the data in the input box Making the complete data for passing to the js Function for populating strAddress can be use now for displaying StrAddress =
StrAddress = strAddress.Replace( "\n", "\\ Replacing the \n and \r with respective value to display Inside the loop of reading the records from DataReader In some case we need to refer to remote database (external) and populate the data from that database depending on some predefined criteria for our further processing. In such case, if we are using text box for the fields, we need to handle the newline and carraiage return characters in different way. In some case we need to refer to some external database and populate data depending on some predefined criteria for our further processing and submit them to another database. Though we can use TextArea for such type of data, sometime such situation comes in an unavoidable way. If any data contain new line or carriage return or both, while displaying on input box, the data after these characters will not come. Handling newline and carriage return with Textbox while working with Databases.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |