asp.net

How to SEO friendly an existing ASP .NET 3.5 web application under IIS6

So, I know there's a lot of this subject here and over the Internet. But most articles/questions refers to "static" url rewriting, like: www.site.com/products.aspx?category=Books So they rewrite it to www.site.com/Products/Books That's ok but I need something else. The site is like a CMS, it has different types of content. Nowad...

Where do I put Imports in ASP.NET?

I am trying to import the following: Imports System Imports System.Data Imports System.Data.SqlClient In order to be able to use "Dataset()" I am a beginner and don't know where to put the imports in ASP.NET. Please help! Maybe these are not necessary? I am trying to import a remote XML file into a DropDownList. ...

What free site(s) and resources do you use to advance your ASP.NET knowledge?

What free site(s) and resources do you use to advance your ASP.NET knowledge? Other than this one, of course. I mean, we always google for answers to daily problems with work or our personal projects, but do you have any specific "one-stop shops" to where you have advanced your skills? I guess specifically I'm looking for middle level d...

Easiest way to get the root domain of a website

I'm trying to figure out the easiest way to get the "http://www.mydomain.com" portion of my website in code instead of having to change it manually between my development and production servers. I'm sure this is really simple, but I can't seem to find it. Thanks! ...

what is the point of an "ID" tag in xml?

<?xml version="1.0" encoding="utf-8" ?> <Countries> <Country> <ID>1</ID> <Name>Nepal</Name> </Country> <Country> <ID>2</ID> <Name>India</Name> <Country> <ID>3</ID> <Name>China</Name> </Country> <Country> <ID>4</ID> <Name>Bhutan</Name> </Country> <Country> <ID>5</...

ASP.Net - Two way databinding of a single entity - Options, best way...roll your own??

I have been searching around to find the best option of doing this. Basically, I want to do two way databinding of multiple controls (textbox, dropdownlist, checkbox, etc) to a single instance of custom class/entity, ie: Person. It seems, the (only?) way to do this is using an like so: <asp:FormView ID="FormView1" runat="server" Data...

Copy info from one dynamically created user control to another dynamically created user control

My ASP.NET WebForm has a place holder on it and user controls are dynamically added to it. The controls mostly have textboxes. Sometimes there are two user controls, sometimes there are ten. Everything is working as expected. My question is about how to implement a new feature. My customer has a new request to copy data from the fir...

ASP.NET Web Service ONLY returns Documentation Page for all calls

A client has a ASP.NET web service on a shared server (hosted environment). You can go to the web service URL and view the documentation page (xxxxx/service.asmx?WSDL) and see all the methods. Using a tool such as SoapSonar you can execute any of the methods, but the response is always as if you sent (xxxxx/service.asmx) - in other words...

Using Nemerle in asp.net App_Code directory

I want to use Nemerle in an ASP.NET application. Specifically, putting .n files into App_Code. I added this to my web.config system.codedom/compilers section: <compiler language="n;Nemerle" extension=".n" type="Nemerle.Compiler.NemerleCodeProvider, Nemerle.Compiler"/> When running I get this exception: The assembly '' is already loa...

ASP.Net AJAX multiple pageLoad functions possible?

I have an ASP.Net control that injects a javascript pageLoad function. I also have a pageLoad function directly on the page. I can't seem to get them both to fire. Are you limited to only a single function with the same name in javascript? ...

ASP.NET page redirection / crosspost

I have 3 asp.net pages: Search.aspx, Results.aspx and Login.aspx. Now I want anonymous users to be able to search, so everyone can use search.aspx. This page calls Server.Transfer(Results.aspx) and therefore shows the results. Now when the user is not logged in, a link to the login page is displayed on the Results page. The problem is...

Strongly typed calls into web.config without duplicating the property names?

I searched here for the answer. I'm sorry if this has been asked before (as I suspect it has). Summary: How can I have strongly typed calls into my web.config without duplicating the property names? Details: In my code, I try to minimize string usage, and I don't like defining something twice. Complementing both of these wonts is m...

how to get unique elements?

<data> <food> <id>1</id> <name>asparagus</name> <catlog>7190</catlog> </food> <food> <id>2</id> <name>almonds</name> <catlog>7190</catlog> </food> <food> <id>3</id> <name>asparagus</name> <catlog>7192</catlog> </food> <food> <id>4</id> <name>asparagus</name> <catlog>7193</catlog> </food> </data> i would like to get the unique catlogs, ...

limit html characters per line in aspx

Is there a way to configure visual studio to limit the characters on aspx page to a certain number of characters? I tried setting the character limit on Formatting and Validation on aspx page. but that didnt work. ...

How can I set the sqldatasource parameter's value?

I'm trying to set the value of the sqldatasource's selectcommand parameter @ClientID as in the code below, but it's not working out. My code: Dim strCommand = "SELECT caller_id, phone, name, email FROM callers WHERE client_id=@ClientID" SqlDataSource2.SelectCommand = strCommand SqlDataSource2.SelectParameters.Add("@ClientID", iClien...

RESTFull JSON response from asp.net page

Instead of using the web services infrastructure provided by .net, I was wondering what your take on rolling my own asp.net page that you can post data to (I guess all the cool kids are calling this REST,) and retrieving a JSON response from. Is there additional overhead in using an aspx page for this purpose that i'm not aware of? ...

Loss of data in a JQuery call to a WebService

I've made a JQuery function that makes a call to a web service, the web service returns an int but somewhere between the web service returning its value and the JQuery picking it up the data is getting lost. below is my Jquery Function: //Make a call to a web service to get the latest number of comments for this item WebDesign.wfGet...

ASP.Net Worker Process Memory Profile Tools

We have a fairly high volume ASP.Net site written in c# using MS commerce server, running in a 32-bit environment. I see the worker process up to 980 megabytes quite often. I would like to profile this process and determine where any gains could be made in code to reduce the memory foot print of this site. My question what tools have wor...

How to get the URL of the page that called a function?

Here is a code sample: myMaster.Master <asp:LinkButton runat="server" OnClick="anAction_Click"> calls: myMaster.Master.cs protected void anAction_Click(object sender, EventArgs e) { ??? Request.getUrlOfThePageCalling? ??? } I'm using a master page. How do I get the page that cal...

Validation with State Pattern for Multi-Page Forms in ASP.NET

I'm trying to implement the state pattern for a multi-page registration form. The data on each page will be accumulated and stored in a session object. Should validation (including service layer calls to the DB) occur on the page level or inside each state class? In other words, should the concrete implementation of IState be concerned...