Posts tagged: aspnet

Embedding images in an Email sent by ASP.Net Server

Posted by Ruben Canton on January 11, 2012 at 11:49 am
categories Web programming

If you want to embed your images in an email sent using ASP.Net server instead than using URLs you can use an AlternateView and use the mime standard to embed them:

using System.Net.Mail;

protected void SendBTN_Click(object sender, EventArgs e) {

// Send [...]

 

Adding an HTTP Handler to manage Images requests in .Net

Posted by Ruben Canton on September 15, 2011 at 11:32 pm
categories Web programming

Building the Handler
First, make the handler just creating a new class, make it use the IHttpHandler interface to make it “interfaceable“. To make it part of the HttpHandler interface you need 2 methods: IsReusable and ProcessRequest.
The method IsReusable is used to determine if the handler should be kept in memory and be reused by any [...]

 

Using global objects in your page with a Master Page

Posted by Ruben Canton on September 7, 2011 at 8:37 pm
categories Web programming

MasterPages are very useful to set the site structure like a header and footer, but, they can also help managing authorization or global issues of the site just declaring the needed variables on it and using them, if necessary, from the content pages or user controls. Let’s see this with an example, imagine we need [...]

 

Linking a .Net Label Control with an input

Posted by Ruben Canton on August 19, 2011 at 9:31 pm
categories Web programming

In standard HTML label tags are used to assign some text to an input inside a form, giving the user the option to click the text in the label and causing the assigned input to be clicked too. This is very useful for CheckBoxes and Radio Buttons.

<!– Standard HTML4.1 –>
<input type="checkbox" id="CHKCandies" value="1" />
<label for="CHKCandies">I [...]

 

Load dynamic Web User Control in .Net

Posted by Ruben Canton on July 21, 2011 at 10:17 pm
categories Web programming

One of the most common controls used in .Net is the Web User Control, which is in fact a website piece to be reused in different pages.
You normally place them in the page while developing it just dropping it into the page and then using them as part of it, but, what if you want [...]

WordPress Themes