asp.net

ASP.NET - What is the best way to keep jquery from cluttering up my ASPX files?

I'm starting to use more and more jquery. I'm working with dialogs, and each dialog (including javascript) is taking upwards of 20-30 lines of code. There's a few pages where I'll have over 5 dialogs. This gets ugly fast. I haven't even begun to get into sliding interfaces or calendar controls yet. I have more of a PHP background... an...

How to pass the value of a textbox in a datagrid to javascript

Hi, I have a textbox inside my datagrid whose id need to be passed to javascript.The id of my datagrid is Datagrid1 and that of textbox is txtItem.All these are inside a contentplaceholder.Now i have passed the id of textbox as ct100_ContentPlaceholder1_Datagrid1_txtItem.It shows an error in my javascript as "Object reference not set to ...

Confirm message in ASP.NET

hello, I wrote this statment in my code: Response.Write("<script language=javascript>confirm('The system not allow negative inventory,continue?');</script>"); how can I handel if the user clicked "Ok" or "Cancel" button? ...

subsonic asp.net 3 layer architecture object model

Hi there, i've been using subsonic for two years now (actually i'm using 2.1 version in my projects right now). I'd like to structure a new project this way: presentation layer + business layer + data layer with an object model, vertical to the 3 layers, that models business entities. The matter is that subsonic, through the db reading,...

SyndicationFeed: Content as CDATA?

I'm using .NET's SyndicationFeed to create RSS and ATOM feeds. Unfortunately, I need HTML content in the description element (the Content property of the SyndicationItem) and the formatter automatically encodes the HTML, but I'd rather have the entire description element wrapped in CDATA without encoding the HTML. My (simple) code: var...

Internet Explorer hanging when debugging ASP.NET app

Hi, This problem is beginning to annoy. After my machine (Vista Ultimate) has been up for a while, running my ASP.NET web site project for debugging in VS2008 results in Internet Explorer "hanging". It doesn't seem to get past the network access stage, you know when it says "Loading web site", or "Waiting for". I've attached a screens...

ASP.Net MVC XDocument Html.Decode/Encode Help

Can someone explain the best way to handle this approach. I am using TinyMCE editor. The information typed into this is loaded into a XDocument and then written to the database as a string by doing XDocument.ToString() When I output the content to a webpage I load the string from the database into a XDocument, find the element and do a...

Delete Image

Hi All, I am using asp.net C#. I am saving image file in the folder and deleting it.When i am deleteing it gives error "The process cannot access the file 'C:\Inetpub\wwwroot\Admin\Temp\visible_Jul-13-2009_035606.png' because it is being used by another process" Please Help Code: fupAddImage.PostedFile.SaveAs(Server.MapPath("Temp") + ...

What's the best way to "wrap up" HTML with a User Control?

I currently have this block of code (or something similiar) on almost all my pages: <div class="tasks"> <ul> <li><a href="#">Do something</a></li> <li><a href="#">Do something else</a></li> </ul> </div> However, I need to turn this into a user control. I'd like something that looks like the following: <foo:TaskLis...

ActiveX doesn't show up in Browser

Hi, i'm trying to put an activeX object on an asp-webpage. it already worked good a week ago, but now the object isn't showing up anymore. already made a little asp testing-project....just an asp-page and a activex control, containing a button and a label. but when i call up the page in the browser, there is only a white area with a lit...

.NET for freelance projects?

I'm looking to do a website for a client and I am considering using ASP.NET. Can I use the express version of Visual Studio to build this or do I have to buy a license? ...

Get element by ID in JavaScript

I use JavaScript and this error appears for me during execution: Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object this my code: <asp:Content ID="content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <script language="javascript" type="text/javascript"> function ConfirmTransfe...

Detecting XHtmlConformance setting at runtime (without reference to web.configs)

Question: Is there a way to detect what XHtml conformance setting a particular ASP.Net web page is being generated using at run time (without reference to the web.config). Background: We have ASP.NET web pages which need to work under different XHtml Conformance modes - mostly Legacy (Sorry Mum), but some which use Transitional to enabl...

Assigning list of values to user control property

Hi, I have a button user control, on which I've created a property, UserRights, which I use to define the rights a user must have before the button is enabled. These rights are defined as public constants in a class called UserRight (I don't use Enum for some special code design reasons). So, what I would like to achive is this: <hmk:...

Can we integrate napster in a .net website?

Can we integrate napster in a .net website? If so please suggest any documentation to refer to. Thanks. ...

ReportViewer Error with asp.net 3,5

Hi there. I'm working visual studio with c#. I have a web page and it has a ReportViewer like that: <rsweb:ReportViewer ID="rvCinsiyeteGoreHastaSayisi" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="400px" Width="400px"> <LocalReport ReportPath="RptCinsiyeteGoreHastaSayisi.rdlc"> <DataSources> ...

ASP.Net not recognising querystring parameters

I'm having a problem with ASP.Net mysteriously losing one of my QueryString parameters. I have URLs like the following (pasted from my browser address bar): //Short example http://localhost/AllAboutThatWeb/SPARQL?partialResults=True&amp;query=SELECT%20*%20WHERE%20{%3Fs%20%3Fp%20%3Fo}&amp;timeout=1000 //Long example http://localhost/Al...

Why doesn't ScriptReference override Equals?

I was wondering if there is a good reason for ScriptReference not to override Equals. It would certainly make life in ScriptReferenceCollections easier (e.g. Contains), would it not? ...

Forms authentication for xml files

Hi, I was wondering if you could protect xml files through forms authentication in ASP.NET 3.5. I have some licensekeys that are found online, but you shouldn't be able to download them unless you are logged on. For aspx pages this works automatically but not for xml files. ...

ASP.NET app hangs when accessing ActiveX component

We use MapInfo MapX mapping engine in our ASP.NET application. After server (Windows Server 2003 SP2) reinstallation we encountered a strange problem - web app hangs when accessing ActiveX instance. For example: MapXLib.Map _mapXMap = (MapXLib.Map)HttpContext.Current.Server.CreateObject("MapX.Map.5"); _mapXMap.MapUnit = MapXLib.M...