I've a strange problem. We use Dutch and French lanuage on our site (nl-NL / fr-FR)I'm binding to a gridview and the strange thing is, the numeric value-saparator (dot) is not displaying well for French (fr-FR)ASP.NET
On opening this PDF attachment i am gettng an error message.
Adobe Reader could not open 'ExportedTo[1].pdf' because it is either not a supported file type or because this file has been damaged(for example, it was sent as an email attachment and wasn't correctly decoded).
Is it that with this approach we can't export asp.net content into PDF. Do i have to use any 3rd party component to export the content into PDF format.
The Format property of the CalendarExtender doesn't work when the EnableScriptGlobalization and EnableScriptLocalization properties of the ToolScriptManager are True. For some unexplicable reason the seperators are changed from "/" to "-"
I can get around this problem on the client by formatting the bound textbox in the OnClientDateSelectionChanged client event but have no way to set the CalendarExtender SelectedDate property on the server because the wrong date seperator is displayed.
I have a label in a gridview which does a calc and works great however it does not format currency as expected. The label takes the bound value of QTY and multiples with the bound value of PRICE that is wrapped in a function to get a gross price.
I have an XElement object that contains about 120MB of data. The XML consists of approx 6000 elements of about 20kb each.
I am trying to call XElement.ToString() as I need to return the OuterXml in a webservice.
I am getting a System.OutOfMemoryException.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown:
at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength) at System.Text.StringBuilder.Append(Char[] value, Int32 startIndex, Int32 charCount) at System.IO.StringWriter.Write(Char[] buffer, Int32 index, Int32 count) at System.Xml.XmlEncodedRawTextWriter.FlushBuffer() at System.Xml.XmlEncodedRawTextWriter.WriteAttributeTextBlock(Char* pSrc, Char* pSrcEnd) at System.Xml.XmlEncodedRawTextWriter.WriteString(String text) at System.Xml.XmlEncodedRawTextWriterIndent.WriteString(String text) at System.Xml.XmlWellFormedWriter.WriteString(String text) at System.Xml.XmlWriter.WriteAttributeString(String prefix, String localName, String ns, String value) at System.Xml.Linq.ElementWriter.WriteStartElement(XElement e) at System.Xml.Linq.ElementWriter.WriteElement(XElement e) at System.Xml.Linq.XElement.WriteTo(XmlWriter writer) at System.Xml.Linq.XNode.GetXmlString(SaveOptions o) at System.Xml.Linq.XNode.ToString()
I have the same data in an XmlDocument and can call XmlDocument.OuterXml without a problem. I can also call XElement.Save() to save the XML to a file without a problem.
I have deployed my asp.net application in my hosting provider they are from US... I have one filed in which i have wriiten Datetime.now.tostring() it saves in Database table it save 11/11/2010 5:20:47 AM
When I run the following debugging code it writes out credits:0
Dim MembershipUser As MembershipUser = Membership.GetUser() Dim UID As String = MembershipUser.ProviderUserKey.ToString SQL = "SELECT SUM(Credits) As Credits FROM Credits WHERE " & _ "DateDiff(m, [DateTime], GETDATE()) < 6 AND [UserID]=@UserID;" cmd = New SqlCommand(SQL, Conn) cmd.Parameters.Add(New SqlParameter("@UserID", UID)) DataReader = cmd.ExecuteReader() If DataReader.HasRows Then Do While DataReader.Read
datetime.parseexact not working in windows 7. I have set Datetime Format using Control panel also change the Location and English (India) to English(USA)...but still not working...
I have been attempting to find a solution for my phone number formatting problem for 2 hours now and I am not getting any closer. My 10 digit phone number is stored as a varchar(14) without any formatting (just 10 digits).
Here is the code to format the phone number in a gridview:
[Code]....
why the formatting won't work? It just displays the 10 numbers with no formatting.
after my grid view updates a record I would like to run some code, I have tried to use SelectedDataKey.Value.ToString() to get the datakey. However it is null, the record updates so the value must be stored somehow?
I have a ListView control that pulls a phone number from a db table. I'd like to format the phone number in the presentation layer to look like (###) ###-####.
The code line currently looks like this. The page displays the phone# but unformatted, i.e. 9999999999.
[Code]....
Based on other posts I've looked at in this forum, I've also tried:
<li>Phone: <%# String.Format("{0:(###) ###-####}", Databinder.Eval (Container.DataItem("Phone"))) %> with no success. In fact, this particular line throws an exception in my application (Input string not in the correct format).
The datatype I'm using in SQL is varchar(15)
The MSDN documentation for the String.Format method hasn't been very helpful thus far.
But when it shows the graph its XAxis Date Format is not according to my requirement i.e. "MMM-yy" But its showing the format that is stored procedure giving to the DataSource binding of this chart.
I have created an asp.net site with anonymous access turned off. Its for an internal (intranet) system which uses User.Identity.Name.ToString() to get the users login windows ID and then displays some records from a datagrid depending on their login ID. Is this secure? Also i am struggling to workout how best to store the result of User.Identity.Name.ToString() as I am not keen on storing it in a hidden text field and would rather not call it all the time unless this is the best way?
I have a web page which has few comments box which multi line asp text boxes. When i submit the page, i pass all the data as Server.UrlDecode(Request.Form.ToString()). Before submitting it to DB and splitting the string based on & and manipulating the values. But when the user types in & in the comment box, my string manipulation gets messed up and i am getting "Index outside the bound" error.
Is there any way to encode user typed & and manipulate it?
Instead of checking for the URL [URL] in 'main.cs', Can I check for the same condition in the 'web.config' file ? If so, How can I do that ?? Is there any way to transfer the part -- Request.UrlReferrer.ToString().Substring(0, 31).Equals[URL] -- into the 'web.config' !!