ads

Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Sunday, September 16, 2007

C# Link Generate to HTML Code

Here is a sample program where user can generate HTML Link code just by inputing the address and description of the Site.. then the application will automatically generate the code

screen shot
Source Code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Link
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
String linkname = "", linksite = "", linkdesc = "", linkResult;
linkname = textBox1.Text;
linksite = textBox2.Text;
linkdesc = textBox3.Text;
string link = "" + linkname + "";
if (textBox4.Text != "" )
{
textBox4.Text += "
" + link;
}
else
{
textBox4.Text = link;
}
}
private void button2_Click(object sender, EventArgs e)
{
textBox4.SelectAll();
textBox4.Copy();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
WebBrowser web = new WebBrowser();
linkLabel1.Text = SiteAdvertise(1);
web.Navigate("http://zoul1380.blogspot.com","_new");
}
}
}

Google Search