Popular searches

Searching for asp



  • JQuery and ASP.NET - lets involve ASP.NET
    In this example we create a table - and a span When clicked on the span an Ajax request shold be made - from the serverside the current minute should be returned - and the the current minute is label should be updated: Really easy and it's pretty much like the first Ajax example here at ASPCode.net - Starting with Ajax.NET  - meaning we (as opposed to the case with Ajax
  • asp:repeater and css table gallery
    Ever seen CSS Table Gallery before? Just found it yesterday and since I am pretty useless when it comes to design I bookmarked it in a hurry and then found that this is also the perfect reason as to why you shouldn't use asp .net dataview or datagrid for table rendering. Use repeaters - and you will have the control to generate the type of HTML expected by those lovely designs.
  • Master pages in ASP - free template engine
    We are here gonna create a three page website - all pages should use a "template" for layout. This will enable us to easily keep a consistent layout for all our pages and also, it sure brings  structure to your code. I have used this technique for 5 years or so, one larger example can be free downloaded (AdMentor ASP). Our basic idea: Create a different asp file fo
  • aspECard is profiting on my script PostcardMentor
    o the right to see them). Is it a coincidence? Please notice that all url query parameters are named the same - years ago when I started coding ASP and developed PostcardMentor for ASP and all other of my ASP scripts I for some stupid reasons always called my auto increment fields in the data
  • ASP domain part from an URL
    - 1 ) End If DomainFromReq = sText End Function %> Use it like this: DomainFromURL( "http://www.aspcode.net/default.asp") -> www.aspcode.net DomainFromURL( "https://www.aspcode.net") -> www.aspcode.net DomainFromURL( "www.aspcode.net/ar
  • asp:repeater and css gallery - adding hovering and odd rows
    This article begins here . Odd rows in another color Easy enough. We just change the alternatingitemtemplate to include a CSS class:
  • Your first ASP.NET script with Ajax
    This is just a very basic example on how to deliver Ajax functionality from your ASP.NET applications. The downloadable solution contains two code files - but lets start with looking at the screenshots: The idea is we should be able to just click the "Refresh time below" link and get a new date - without the page reloading: So easy enough. Lets look at t
  • ASPCode.net.Cookie released
    This library (or plugin or whatever it should be called) extends Microsoft Ajax by offering easy client side support for cookies. Not much to say about it - the code to use it in your project looks like this: ASPCode.net.History released
    ms in Microsoft Ajax made me create this plugin. It's best described in another article, so instead of just repeating myself http://www.aspcode.net/articles/l_en-US/t_default/ASP.NET/ASP.NET-2.0/Ajax/ASP.NET-AJAX-formally-Atlas/Accessible-Ajax-calls-2--solving-history-problem_article_4
  • How Ajax for ASP.NET updatepanels work
    I will now try to show you the different types of updates you can do - cause there is indeed a plethora of them and the variations really got me confused today. I started working on this sample http://ajax.asp.net/docs/mref/M_System_Web_UI_ScriptManager_RegisterAsyncPostBackControl_1_62fe17e7.aspx and the code http://ajax.asp.net/docs/ViewSample.aspx?sref=System.Web.UI.Scri
  • Dynamically select CSS in ASP.NET
    By setting a control in your ASPX page  to runat="server" you make the control available to serverside modifications. While you most often use it for pure asp.net server controls, such as <asp:TextBox ...>, <asp:Label ...> etc you can in fact use it for other elements as well. In this example I will list all available css files in a directory and by a dropdownl
  • ASP.NET and Ajax urlrewriting
    You might have read this article on Url rewriting and while Scotts smk:form did work at that time - I couldn't get it to work after installing VS2005 SP1. No idea why, but I decided it was time to look further. I have now started converting old apps to use Urlrewriting.net  . It might give you some trouble at first - it's a lot of web.config changes with httpmodul
  • ASPMail ( SMTPsvg.Mailer )
    sp;  end if    Set objMail = nothing End Function   1. Copy it into a file called incgenmail.asp 2. Include that file from your ASP page supposed to send the mail <!--#include file="incgenmail.asp"--> 3. Call it like this: sErrMsg = SendEmail( "smtp.theserver.com",
  • Our free ASP.NET server controls
    a shortcut for you all to find my free controls. Site content is growing at an incredible speed, so some sort of extra structuring is needed. Free ASP.NET server controls     ASP.NET Thumbshots Not an actual control, but a handler fetching a thumbshot (small
  • JQuery and ASP.NET - returning classes with JSON
    This article is part of an article serie - please start by reading ASP.NET and JQuery - first example , JQuery and ASP.NET - lets involve ASP.NET   and Ajax loading animation with JQuery and ASP.NET   and Timed Ajax calls with JQuery and ASP.NET . Now we are gonn
  • ASP.NET name mangling problem with JavaScript
    One "problem" with ASP.NET is the automatic generation of names for form variables. Sure it is convinient - and more or less a must when it comes to templated databound server controls to be able to separate the different client side controls. And it works beatifully as long as you just stay on the serverside. Cause after a postback the correct serverside control will be f
  • ASP.NET and JQuery - updating templated controls with AJAH
    Continuing our serie on JQuery and ASP.NET we are now gonna create an interface looking like this: When selecting a filter we want to spawn an Ajax request and update only the table part of the interface: So far we have used ASHX handlers and returned JSON structures containing business data so to speak - however now we sure would like to have the page generat
  • Timed Ajax calls with JQuery and ASP.NET
    This article is part of an article serie - please start by reading ASP.NET and JQuery - first example , JQuery and ASP.NET - lets involve ASP.NET   and Ajax loading animation with JQuery and ASP.NET . Now this is an exact port of the case we solved using Ajax.NET in this article . We want to periodically call our "timeserver" using Ajax calls a
  • ASP.NET 301 redirect
    IIS .  Such a solution is very flexible and since it is a IIS filter it is possible to rewrite URL:s for all kind of filetypes, not only for aspx pages but say images (ex http://www.hello.com/*.gif could be transferred to http://www.hello.com/test/*gif ). It is however not possible for e
  • Creating an ASHX handler in ASP.NET
    em We want to create a page on our site returning an XML file to the visitor. Possible solution There are lots of suggestions creating a regular ASPX page (say rss.aspx) and in Page_Load use Response.Write to return the XML. Example: public class RSS : System.Web.UI.Page { private voi
  • Including WebResource in ASP.NET server control
    Embedding resources (such as images, javascript, stylesheet information) into your server control makes it a lot easier for redistribution - and reusing the control in other projects is indeed the reason as why to create a control at all. This example will show you how to embed a javascript in your server control. Consider this example: We are creating a control - JSLog in asse
  • Step 2 - page1.aspx
    Now lets look at page1.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="page1.aspx.cs" Inherits="page1" Title="Page 1" %> <%@ Register TagPrefix="headermanager" Namespace="ASPCodeHeaderManager" Assembly="ASPCodeHeaderManager" %>
  • Step 3 - page2.aspx
    In this page we are using two controls (just to show you it's possible). <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="page2.aspx.cs" Inherits="page2" Title="Untitled Page" %> <%@ Register TagPrefix="headermanager" Namespace="ASPCodeHeaderManager" Assembly="ASPCodeHeaderManager" %> ASP.NET search terms to database and listing most popular
    Logging search terms your visitors are using at your site can be valuable for you as a webmaster, first of all just knowing what they are looking for at your site but also it can give you a hint if some of your content seems hard to reach by "regular" navigation making people always needing to search for it. In this article I will give you rhe kind of search term logging mechanism I am us
  • ASP.NET Repeater control instead of grid
    If you have read some of my articles here at ASPCode.net by now I am sure you know my strive for doing things myself instead of relying on thirdparty controls. For example, I have developed professional ASP.NET solutions almost every day for at least 5 years and still havn't delivered a single one (well maybe one or two in the beginning) using the datagrid/gridview. I basicall
  • ASPEmail
    sp;  End If    Set objMail = nothing End Function   1. Copy it into a file called incgenmail.asp 2. Include that file from your ASP page supposed to send the mail <!--#include file="incgenmail.asp"--> 3. Call it like this: sErrMsg = SendEmail( "smtp.theserver.com",
  • Simple ASP.NET SOA architecture
    Overview Here we will create a ASP.NET driven application providing a domainname to ip service for a Windows client application. Foreword Ok, here I will get into a "hot" concept - SOA - but to be honest - I don't care about the names and terminology - I just wanted a soluton that performed ok. However - do be correct - I do care about the names, domain names. Cause th
  • ASP.NET repeater control - databind with style
    If I had to name *one* single control as my favorite ASP.NET server control, it would most probably be the asp:repeater . When I started ASP.NET programming the datagrid was my best friend - or I wanted it to be - I tried in every way to use it whereever possible. I even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I m
  • Creating an RSS feed for your ASP.NET site
    How useful a RSS feed actually is is hard for me to say something about, I personally have a hard time understanding the buzz about blogs (why should that be better than a regular website). While the content people present in blogs might be really good - I just love Scott Guthries blog , the big problem with blogs (and I mean the actual blog applications) is categorization of data. H
  • Suckerfish menu with ASP.NET and JQuery
    This time I am giving you the ASP.NET code for creating a Suckerfish menu in ASP.NET. I really like the multiple level/hover shows next level type of menus like in these screenshots:       I keep trying to push for JQuery - not only is it small, wellwritten, MIT licensed (allows for use and distribution in commercial projecvts as well) but it's also a very comp
  • JQuery tree viewer in ASP.NET
    Here's a ASP.NET and JQuery based tree viewer example. I'm using Jörn Zaefferers treeview for the javascript tree rendering for the simple reason it's completely unobtrousive. You mark the tree up by regular ul/li structure - meaning if someone doesn't have Javascript activated (say a search engine spider for one example) they will be still be presented with all the content and it's possible
  • A watermark texbox with JQuery and asp.net
    Finally I have managed to fix the search box here at aspcode.net. I upgraded CMS, changed the layout and everything but didn't manage to get everything up and running before by summer vacation. Anyway - have you tried the search box? It is one of those  watermark textboxes  - meaning it has a descriptive value (such as Search...) or a default value but when clicked (focus
  • Old ASP application fixed and quick shortcuts
    I have now fixed up the download links for my old free ASP scripts. Sorry about the trouble and I do agree it wasn't too smart going on vacation the very days after a new site release, but hey, it's just a website nothing more right :) PostcardMentor http://www.aspcode.net/Download-latest-vers
  • Use NetSpell in your ASP.NET 2.0 application
    This simple beginners tutorial will show you how to start using the free spellchecking component NetSpell from Loresoft from within your ASP.NET 2.0 application. When you download it http://sourceforge.net/projects/netspell/ you will see there is a full featured ASP.NET forms example - however since I was in need of something much simpler (actually just take a string and fro
  • Using ASP scripts from HTM pages
    one that shows the headlines ) reads the headlines from the database and generates HTML code for it. It works great showing those headlines from ASP pages - and on that specific site. Now, imagine I would like to show the same news on another site. I have access to ASP on this server as well,
  • Sending mail from ASP application
    You know the problem... You download a piece of ASP sourcecode which includes some sort of sending email functionality, it might be a recommend-a-page script, forum etc: - you will now need to get it to work with the email component you are using - cause it is not the same as the developer used...
  • Download the asp.net javascript logging console
    g messages from my javascript code - and preferably the console would be hidden until I needed to see it b) I would like to wrap it all up into an asp.net server control - and embed all needed javascript to handle the console. Then all I need is to reference it, put it into my aspx pages and viol
  • Ajax loading animation with JQuery and ASP.NET
    Continued from part 2 of our serie on ASP.NET and JQuery .  Now lets add some animation when we are doing the ajax calls. First we add the image to the document - and place it where we want it to appear (in this example next to the minute label - which is the one to be updated) Current minute is
  • NUnitAsp - ASP.NET unit testing
    NUnitAsp is a tool for automatically testing ASP.NET web pages.  
  • The Google Analytics ASP.NET webcontrol
    I won't explain much, but rather show you the use of it: 1. add a reference to the GoogleAnalyticsCtrl dll. 2. Declare the use of it from your aspx page: <%@ Register TagPrefix="analytics" Namespace="GoogleAnalyticsCtrl" Assembly="GoogleAnalyticsCtrl" %> 3. Put the control i
  • Using thumbshots.org with ASP.NET and C# part 1
    Ever heard of thumbshots.org  ? They offer a (free) service letting you retrieve thumbnail images from websites and webpages for use in your own web pages. Pretty cool and so easy to use: In short - you just point your images to their handler and add your specific url at the end:
  • Redirecting with status 301 in ASP
    es that a real/permanent move of the file has been made. Some people contacted me right away after I published the ASP.NET article, asking about the ASP equivalent. I can't say how to create a generic handler (not sure it's even possible) but redirecting a single page is sure simple enough:
  • Last second HTML changes in your ASP.NET page
    is a was to manipulate the resulting HTML and ASP.NET page has generated just before it's sent to the browser. Now you might ask, isn't that what ASP Server controls are made for? To generate the HTML for you?  Because there are certain times when the HTML or JavaScript it generates a
  • ASP.NET hoverextender to create a live.com image search like gui part 1
    Thie will be a sort of Ajax solution - no worry - but the first thing I want to show you is simply how effective CSS can be. In short we are gonna create a GUI looking like the one found on Live.com - example See the hovering effect? That's cool and since I needed to create such an effect for a project I am (still) working on - I decided to try to mimic it. The basics I sta
  • Using thumbshots.org in ASP.NET and C# - part 2
    Please start reading this from the beginning Part 2 - we continue our development of the thumbshots.org cache handler: Our img src will point to: img src="thumbshot.ashx?u=www.yoursite.com" and lets start with looking at the handler code: public void ProcessRequest (HttpContext context) { System.Drawing.Image oImgOriginal; System.
  • ASP Shopping carts
    I was asked by a client to help with implementing a shopping cart against their existing database (containing the catalog). This was indeed my second asp contract in a very short time - after "not having to touch it" for years. Just kidding about "not having to touch it" - but ASP.NET is really a
  • Storing passwords in your ASP.NET application - part 1
    ted hash value - not the actual password - is implemented in ASP.NET 2.0 membership provider system - but this article shows you how to use it in your ASP NET1.1 (or Windows forms) applications as well.  Please now read Part 2 - which explains the downloadable application .  
  • Visit our new JQuery and ASP.NET driven font database
    o get away from dark Swedish autumn) - however after that I have been working pretty hard on getting a "real" site up using JQuery and ASP.NET. And finally - while I  do know I have some more things to do before it's totally ready to fly - please visit the site for free fonts
  • ASP date function wrappers
    efore I have my own wrapper functions ( together with some other date functions - like show all months in a list etc ) in my own includefile: dateinc.asp. Easy to lookup and it allows me to call those functions what I want ( ( since I am an old C++-programmer actually ). Here are the functions in
  • ASP.NET and JQuery - first example
    t and server). I will in later articles describe how that could be done. Anyway, we need to start somewhere - and in the first example there is NO asp.net, no AJAX - just a simple HTML file - and some javascript. The reason for that is well, lets look at the example first: When clicked a
Searching for asp