I have a a string in c# initialised as follows:
string strVal = "£2000";
However whenever I write this string out the following is written:
£2000
It does not do this with dollars.
An example bit of code I am using to write out the value:
System.IO.File.AppendAllText(HttpContext.Current.Server.MapPath("/logging.txt"), strVal);
I...
Hi.
Is it possible to force/extend routing engine generate urls in lower case, "/controller/action", instead of "/Controller/Action"?
...
As far i learned ....AJAX is used for partial page refresh (overcoming the flickering effect in the web page) ....Is there any other features in AJAX....
...
I am using ASP.net for developing an intranet website. I need to hold the userid across all postbacks for all the pages in the website. Is it advisable to hold those information in Session or somether way is available.
...
hi guys,
I have a dropdownlist that displays time only.Like 8:00AM,8:30AM............When i save this time to database i want to save as todays date + time.
eg:8:00AM as 03/30/2009 8:00:00:000.Can anybody give appropriate code to convert as above shown eg:
I tried Convert.ToDateTime(ddlStartTime.SelectedItem.Text)
the one error i...
Hi,
I conditionally hide/show panels in a DetailsView...
I want to also hide/show the DetailsView row/field that the panel is contained in
because it is currently displaying empty rows when the panels are hidden?
ASCX:
<asp:DetailsView>
<asp:TemplateField>
<ItemTemplate>
<asp:panel runat="server" ID="pnlHideShow" OnInit="OnInit_...
Hi,
We currently have fairly robust error handling functionality in our ASP.Net application.
We log all errors in the database, a text file on the server
and also send automated emails containing the error details back to our support people.
This all happens on the server of course.
We would like to capture (and retrieve) an image o...
I'm working on a project which will pull data from two different tables, Events and Travel Times. I'm displaying it in a DataList using ItemTemplate. Almost all of the information displayed in the DataList will be from Events and will always be displayed. The data from Travel Times will only be shown if it falls within a certain range of...
I have this table structure:
- CategoryID
- CategoryName
- ParentID
I want to load data from this table into a treeview control, to be able to edit/delete these records.
How to do that?
...
I'm working on a simple e-commerce website right now, nothing real just practicing
the problem that I'm having is how to make a simple search in the website?
i.e. if I want to search for the word "iphone" in the database of the website.
how can I do that? and how can I specify a column to search in it instead of searching the whole ta...
Related:
Practical Application of MVC || When
to use, or not use MVC
I've recently walked through the entire NerdDinner pdf and sample with the final ASP.NEt MVC build and am thoroughly impressed. Before I start touting it's awesomeness through within our dev group, I'd like to also know what some of the pitfalls or misuses of th...
In ASP.Net there is the app_data folder which is not accessible to users via the web. I would like to store a file in this folder, and read from this file by using a class that I have in the App_Code folder.
Keep in mind that the current working directory here is going to be a directory such as "c:\","c:\windows\system32\", etc. and not...
Hi,
my client has had a security audit of a system I built for them complete.
They want it to work in such a way that if a user logs in via Internet Explorer that when they login via Firefox on the same machine (or via IE on another machine) that it kills the first session.
Essentially this means storing session info in the DB i would ...
Hi,
I have a web app (ASP.NET 2.0 C#)where I get data from an Oracle database into a gridview. I had asked in a previous question how I could turn that data into links that would, for example, take me to a details page. This was the answer I got:
<asp:HyperLinkField DataNavigateUrlFields="ID"
DataNavigateUrlFormatString="DetailPa...
I want to count the number of visits (or visitors, not page requests or hits) made to my whole site.
I want to store each visit in a database to show some graphics with this data in the future.
Also, I want it to be reliable, fast and not to be polling to database for each page request. So, I think I should put some code in some entry...
I just converted a website to a web application project and I am getting this error:
System.Security.SecurityException: Request for the permission of type
'System.Web.AspNetHostingPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Any ideas? Everything else runs fine on IIS7. The applicati...
The idea of storing connection strings in a data base is a perverse idea, but please hear me out first. We all know that it’s best practice to encrypt connection strings in the web.config file, but what if we just skip the web.config file completely?
A couple of months ago I was asked to move databases from one server to another. This m...
Hi all.
I've got an SSRS report that I'm dynamically writing to an HTML page. The report looks great in IE, but it keeps none of its formatting in Firefox.
I've done a bit of research on this, and found that I can insert rectangles inside of all of my matrix data fields, which will keep the formatting. This seems to me like a lot o...
Hi,
Is it possible to put ASp.NET tags in my javascript which is in a seperate script file. For example, I have the following
$.getJSON("/Postcode/GetAddressResults/" + $get("SearchPostcode").value, null, function(data) {
which I want to turn into but it does not like the ASP tags!
var action = "<%=Url.Content('~/Postcode/GetAddr...
I'm trying to add a script reference to jQuery in my master page so that it will work for any page. It currently looks like this
<script type="text/javascript" src="jquery.js"></script>
The problem is that the path is always relative to the executing aspx page so this will only work if the "jquery.js" file is located in the same folde...