I have a simple multiline textbox in an updatepanel. When I click on my command button the text from the textbox is sent to my data access class as input to a stored procedure. Latter I try to view the value from the database like so:
<asp:Label ID="ltContent" Text='<%#Eval("Content").ToString().Replace(Environment.NewLine, "<br />") %>' runat="server"></asp:Label>
The problem is that Replace(Environment.NewLine, "<br />") is not working - I get one long line of text without the breaks. If I copy the field directly from the database using SQL Server Management Studio and paste it into a text editor, I can see that the line breaks are there. Now, if I get rid of the UpdatePanel and use the same code to send the multiline text to the stored procedure, everything works as expected when I display it (I get like breaks). What could be causing this?
Hi everybody i am facing a problem in Deleting a folder from my project.
the case is like this : I want to delete the folder of a perticuler client which is in Images/clients/ (each folder for client). so i have written a code like this
DirectoryInfo dire = new DirectoryInfo(Server.MapPath("..//Images//client//"));
foreach(DirectoryInfo d in dire.GetDirectories())
{
if (d.Equals(Request.QueryString["id"]))
{
FileInfo[] TheFile = dire.GetFiles(); foreach (FileInfo ff in TheFile)
{
if (ff.Exists)
{
File.Delete(Server.MapPath("..//Images//client//") + Request.QueryString["id"].ToString());
}
}
d.Delete();
}
}
There is no error in this code but the condition ' if (d.Equals(Request.QueryString["id"])) ' is not satisfying. it is always false.
Request.QueryString["id"] gets the id of the client which is also the name of the client folder.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Data type mismatch in criteria expression.
Source Error:
|
Source File: C:\Users\CutieYz\Documents\Visual Studio 2005\Projects\OrderWebApp\OrderWebApp\OrderForm.aspx.cs Line: 20
Stack Trace:
|
i have no idea what is wrong with it!! please help me get the possible error!!
I had a WCF service where I wanted to be able to support over a hundred concurrent users, and while most of the service methods had small payloads which returned quickly, the startup sequence needed to pull down 200,000 records. The out of the box WCF service had no ability to support this scenario, but with some effort I was able to squeeze orders of magnitude performance increases out of the service and hit the performance goal. Initially performance was abysmal and there was talk of ditching WCF entirely ( and as the one pushing WCF technology on the project this didn't seem like a career enhancing change ) Here's how performance was optimized: Use NetTCP binding This helps both throughput and the time it takes to open and close connections…(read more)
home |
ASP.Net Questions | Java Questions | C and C++ | Ajax Questions | Database Questions | HR Questions
© IT Questions 2008, All rights Reserved.
