When editing a data record from a detailsview, i need the input to be either a Y or N. I tried using a comparevalidator, but it allows only one character in which the value must be equal to. Ideas?
View Complete Post
I wonder if I can limit number of characters that are being displayed in the view. For example, one of the columns sometimes has very long description. I want people to see only 300 characters, and if they want to read more, they have to click
on the link to go to details.
Is it possible?
I have a column ItemNumber that can have a #, * or ** prior to the item number. I know I can use replace to remove one type of character, but is there a way to strip anytype of special character from the front of the item number?
I have a doc lib.
I have a list i used to store categories.
Then i have a lookup from my doc lib that uses this category colum and i nade it multiple values.
When users try to upload ths docs and add mutiple records using the multiple values they get the error.
This field can have no more than 255 characters.
Any ideas on how i can fix this?
Thanks in Advance
I am trying to use a calculated field to parse another field in a custom list. I basically need to make another field that is Regex safe. So i need to parse the text and look for (\ , - , ( , ) , [ , . , ], +, $, ^) then add a '\' in front of them. I used
excel to make a solution but i can only go 7 or 8 nested SUBSTITUTE deep(or so im told) and you apparently cant use substitute in SP2010.
i tried something like this:
IF(ISERROR(SEARCH(")",[Message])),,REPLACE([Message], SEARCH(")", [Message]), 1, "\)"))
This works. but I need to string 10 more behind it to include the other characters. Any ideas?
Hi,I have grid view control that includes a dropdown control in a template field.I wish to execute some code when the value is changed in the dropdown list. Can't figure out how to capture this event though?Any suggestions?
How to take
value of bound field of grid in a variable or in a textbox.
I m using
this code in .aspx page for grid.
<RowStyle CssClass="odd" />
DataField="DOC_TYPE_PK" Visible="true" >
<asp:TemplateField HeaderText="DOC TYPE ID" Visible="true"> &nbs
how can specified nvarchar data type without N''?
I have a vb.net Sub that is successfully adding 'records' to my XML file:
Private Sub btnSubmit_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnSubmit.Click 'for adding an XML 'record' Using ds As New DataSet() ds.ReadXml(Server.MapPath("History1.xml")) Dim dr As DataRow = ds.Tables(0).NewRow() dr("subject") = txtNewEvent.Text dr("year") = DateTime.Now.ToString("MM/dd/yy") ds.Tables(0).Rows.Add(dr) ds.WriteXml(Server.MapPath("history1.xml")) bind() txtNewEvent.Text = "" E
Am reading an XML from web service and storing in a dataset.
then in write to a DataTable as follows
DataTable dtResult1 = dsSearch.Tables["RESULTSET"];
DataTable dtHIT = dsSearch.Tables["HIT"];
DataTable dtField = dsSearch.Tables["FIELD"];
The issue is in the DataTable dtField i can only see 3 columns FieldID,Name,HIT_ID
The corresponding values in the dataTable looks like this for the corresponding fileds
I am unable to get the Field Name values 1,8799f4646b6ed9acde142581a84f75a6 ,234B5F5F-F247-4EB6-9E39-A7B64C7FE1BD,Yes...etc
What would be the cause for this...Any Help
Below is the structure of the XML-
- <RESULTSET FIRSTHIT="1" LASTHIT="10" HITS="10" TOTALHITS="46" MAXRANK="3159" TIME="0.0040">
- <HIT NO="1" RANK="2955" SITEID="0" MOREHITS="0" FCOCOUNT="0">
<FIELD NAME="internalid">8799f4646b6ed9acde142581a84f75a6 </FIELD>
<FIELD NAME="contentids" />
I'm trying to strip illegal characters out of an XML string before I send it off to a public web service. The xml will look something like this:
<field name="notes">This is a note. Any character could appear here</field>
I need to pull out any ampercand (&) charachters in the any of the fields, as well as any < or > characters, which would make the XML unreadable.
I've tried it like this:
Private Shared Function cleanQuery(ByVal queryNode As String) As String
Dim root As XElement = XElement.Parse(queryNode)
For Each x As XElement In root.Elements
x.Value = x.Value.Replace("&", "&").Replace("<", "<").Replace(">", ">")
That doesn't work so well. I get the error stating:
There are multiple root elements. Line 1, position 15.
I tried wrapping the XML in a single root element, like this:
Private Shared Function cleanQuery2(ByVal q
I was wondering how to recieve an individual field from my MySQL database.
I have been able to get a row, but what I am trying to do is get a name from my database and set it into the HeaderText in my DataGrid.
The way I am trying to do it at the moment is
using (OdbcCommand cmd = new OdbcCommand(formQuery, con))
formDataGrid.Columns.HeaderText = cmd.ExecuteReader(
This doesn't seem to get a value from the GetValue, but if use
using (OdbcCommand cmd = new OdbcCommand(formQuery, con))
formDataGrid.DataSource = cmd.ExecuteReader(
it will bind my data into the grid.
I just want to be able to change the HeaderText in the first coulmn of the DataGrid from one table and have the DataGrid be filled from another table.
I can fill the DataGrid its just changing the HeaderText that I am having trouble with.
On my web application, I display information in different languages. Everything works fine in IE compatibility mode and FireFox but it shows boxes for chinese/japanese languages. I am pretty much having the same issue as described here
Thanks for your help.
Can anyone tell me the best way of storing Japanese characters through ASP.NET.I have to put characters into a asp:textbox on one page, which saves it to an Access DB.On a second page I want to display the content in a asp:label.
Should I store the characters directly to the database or should they be encoded, andhow do I encode the characters?
In my web.config i have:
<globalization fileEncoding="ISO-2022-JP" requestEncoding="ISO-2022-JP" responseEncoding="ISO-2022-JP" culture="ja-JP" uiCulture="ja-JP" />
On the display page I have:
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=shift_jis">
I am working on a site where I use the Split function on a string.
To make sure I used a separator character that I do not use anywhere in the data I selected the character 'ÃÂ£'.
This worked fine in Firefox and Safari, but in IE8 I get an 'Index out of range' error, so apparently the 'ÃÂ£' character is not handled correctly.
I changed the separator to ';', and then it works fine.
i have a string like this sravani/, asdfff/, lsdsf/i want to remove last character '/' in the above string...which function can i use?pls help me....