asp.net

How to stop ASP.NET from changing IDs in order to use jQuery

I have this label control in my web page <asp:Label ID="Label1" runat="server" Text="test"></asp:Label> And when the page rendered the id of the control changes to something like this <span id="ctl00_ContentPlaceHolder1_Label3">test</span> How can I stop asp.net from changing IDs in order to perform a jQuery operation like this ...

How can I assign more than one "CssClass" to a control in asp.net

Can I assign more than one "CssClass" to a control in asp.net?How to do this? ...

Basic Compilation Issue - Please Help!

I got the following code frfom the web and was trying to compile and run. Its an ajax application. I couldn't get it to compile/build this application; because it says - "Are you missing a using directive or assembly reference" - Can somebody advise what/where should I check? Pardon my ignorance, I'm novice at the Ajx stuff :( Here is t...

What to use: Callback, AjAX or simple Javascript in Asp.net app.

I am at a bit of a loss as far as what is the best tool for the job would be: What I need: A parent page has a link, when clicked a pop-up will pop up with a gridview and a save button. If the user saved the gridview, the parent page should refresh and change, in other words I need to be able to pass data between client and server. Pe...

Session containing items implementing IDisposable

In ASP.NET if items are left in the session state that Implement IDisposable but are never specifically removed and disposed by the application when the session expires will Dispose be called on the objects that any code in Dipose() will execute? ...

complex query using LINQ and C#

hello I have a very big problem solving this issue I have 2 tables first table is : which contains a modules (id and name) second table is which contains users ids and their preferred modules' numbers now lets move to the problem I want to generate a list of checkboxes for example for the userid 1 which has the following module...

Need help in login validation using javascript

Please could somebody point me out what is the error here? Using javascript i am validating the user input. When i click the login button without checking the javascript function, it goes to the welcome page. Here is my code: <script type="text/javascript"> function validLogin() { if(document.getElementById("txtUserName").valu...

Best tool for Code-Analyzement or Code-Review

Hello , Which code-Analyzer or Code-Review tool do you suggest , For Analyzing DotNet 2.0 & 3.5 code and getting All classes , Methods , Properties , Instances , Definition , Databases & and their relation to code , I want to get print-ready Information about codes & projects , ( here I dont mean a tool for testing the code & structu...

Ajax Control Toolkit AutoCompleteExtender stripping zeroes and coming up with phantom values

I am using the AutoCompleteExtender from the Ajax Control Toolkit and it is behaving stragely. My service method is shown here: [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public string[] getEJMaps(string prefixText, int count) { // method that returns the auto-suggest for the EJMaps positions string...

Use subversion for asp.net deployment - Causes appdomain recycle

I am experimenting with using subversion to deploy updates to my ASP.Net application, one issue that I am facing is that whenever the working copy(containing the build) is updated the ".svn" folder inside of bin gets updated and this causes the ASP.Net appdomain to recycle. I don't want this to happen unless something in bin has actually...

.Net: Is String.Contains() faster than String.IndexOf()?

I have a string buffer of about 2000 characters and need to check the buffer if it contains a specific string. Will do the check in a ASP.NET 2.0 webapp for every webrequest. Does anyone know if the String.Contains method performs better than String.IndexOf method? // 2000 characters in s1, search token in s2 string s1 = "Many ...

.NET: Looking for best performing appender of log4net

We are currently using the log4net appender (web.config snippet): <appender name="FileAppender" type="log4net.Appender.RollingFileAppender"> Looking for experience using other appenders. ...

How to build a simple recommendation system?

How to build a simple recommendation system? I have seen some algorithms but it is so difficult to implement I wish their is practical description to implement the most simple algorithm? i have these three tables Users userid username 1 aaa 2 bbb and products productid prod...

Using WebClient to get Remote Images Produces Grainy GIFs and Can't Handle PNG+BMP

Greetings! I'm creating a web form prototype (ImageLaoder.aspx) that will return an image so that it may be used like this simple example other Web Forms/web pages: <img src="http://www.mydomain.com/ImageLoader.aspx?i=http://images.mydomain.com/img/a.jpg" /> So far, it loads JPGs with no problems, however GIFs look "grainy" compared ...

Best way to add a key/value to an existing URL string?

I want to generate a link on my page where a key/value pair is added to the URL dynamically so that: Default.aspx?key1=value1 Becomes: Default.aspx?key1=value1&key2=value2 So that the existing query retains any keys in the URL. Also, if there are no keys, then my key would be added, along with the '?' since it would be needed...

Treeview Event Handling ASP.Net

I have a treeview with three Nodes, All I want is to attach EVent Handling functionality to only two nodes the third node will be there for representational purpose only. ...

Change selected value of drop down list with jQuery

I have a drop down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery. Using regular JavaScript, I would do something like: ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it to. However, I need to d...

LINQ InsertOnSubmit: NullReferenceException

I have this code: using DC = MV6DataContext; using MV6; // Business Logic Layer // ... public DC.MV6DataContext dc = new DC.MV6DataContext(ConnectionString); IP ip = new IP(Request.UserHostAddress); dc.IPs.InsertOnSubmit(ip); dc.SubmitChanges(); // in Business Logic layer: public class IP : DC.IP { public IP(string address) { ... } ...

C# asp.net gridview bind dropdownlist to List<keyvaluePair<int, string>>

Hi all, OK,... so I have a number of tables in my DB that hold references to an key value pair: types of phone numbers: 1 - Home 2 - Work 3 - Mobile 4 - Fax etc So I have a table for the types and when they are used in other tables they reference the int value as a foreign key. When I have been pulling them out I have been storing...

What might my user have installed thats going to break my web app?

There are probably thousands of applications out there like 'Google Web Accelerator' and all kinds of popup blockers. Then theres header blocking personal firewalls, full site blockers, and paranoid cookie monsters. Fortunately Web Accelerator is now defunct (I suggest you read the above article - its actually quite funny what issues it...