Sharing on facebook,Twitter,Linkedin using Customized url
To Accomplish this place three buttons on Webform called Twitter,facebook,Linkedin buttons
In the Twitter button click event
Protected void Twitter_click(object sender, EventArgs e)
{
//path of custimized url
string Customizedurl="";
string twitterUrl = string.Format("http://www.twitter.com/share?url={0}", Customizedurl);
Response.Redirect(twitterUrl );
}
In the facebook button click event
Protected void facebook_click(object sender, EventArgs e)
{
//path of custimized url
string Customizedurl="";
string facebookurl = string.Format("http://www.facebook.com/share.php?url={0}", Customizedurl);
Response.Redirect(facebookurl );
}
In the Linkedin button click event
Protected void linkedin_click(object sender, EventArgs e)
{
//path of custimized url
string Customizedurl="";
string linkedinurl = string.Format("http://www.linkedin.com/shareArticle?url={0}", Customizedurl);
Response.Redirect(linkedinurl);
}
To Accomplish this place three buttons on Webform called Twitter,facebook,Linkedin buttons
In the Twitter button click event
Protected void Twitter_click(object sender, EventArgs e)
{
//path of custimized url
string Customizedurl="";
string twitterUrl = string.Format("http://www.twitter.com/share?url={0}", Customizedurl);
Response.Redirect(twitterUrl );
}
In the facebook button click event
Protected void facebook_click(object sender, EventArgs e)
{
//path of custimized url
string Customizedurl="";
string facebookurl = string.Format("http://www.facebook.com/share.php?url={0}", Customizedurl);
Response.Redirect(facebookurl );
}
In the Linkedin button click event
Protected void linkedin_click(object sender, EventArgs e)
{
//path of custimized url
string Customizedurl="";
string linkedinurl = string.Format("http://www.linkedin.com/shareArticle?url={0}", Customizedurl);
Response.Redirect(linkedinurl);
}
No comments:
Post a Comment