http://www.aspsnippets.com/Articles/Find-Visitors-Geographic-Location-using-IP-Address-in-ASPNet.aspx
Thursday, 30 June 2016
Saturday, 25 June 2016
Bind Images with DropDownList using ASP.net
Create a New Folder with Name msdropdown , click on Download and Paste the files with jquery files to this folder.
Image Folder Name : Images
Sql Scripts :
create table ActorVotings (ID int identity(1,1) Primary Key,ActorName varchar(50),ActorImage varchar(50))
Webform1.aspx
%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="BindDropDownWithImages.WebForm1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Dropdownlist with Images</title>
<link href="msdropdown/dd.css" rel="stylesheet" type="text/css"></link>
<script src="msdropdown/js/jquery-1.6.1.min.js" type="text/javascript"></script>
<script src="msdropdown/js/jquery.dd.js" type="text/javascript"></script>
<!-- Script is used to call the JQuery for dropdown -->
<script language="javascript" type="text/javascript">
$(document).ready(function (e) {
try {
$("#ddlCountry").msDropDown();
} catch (e) {
alert(e.message);
}
});
</script>
<style type="text/css">
.style1
{
height: 26px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:panel id="Panelp" runat="server" style="height: 100%; width: 100%;">
<div id="div1" runat="server" style="height: 870px; width: 100%;">
<table>
<tr>
<td align="right" class="style1" colspan="2">
<b>Select Your Favorite Actor: </b> </td>
<td class="style1" colspan="2">
<asp:dropdownlist autopostback="true" height="189px" id="ddlCountry" onselectedindexchanged="ddlCountry_SelectedIndexChanged" runat="server" width="147px"></asp:dropdownlist>
</td>
</tr>
<tr>
<td colspan="2">
<strong>You have Selected</strong></td>
<td colspan="2">
<asp:label id="lbltext" runat="server"></asp:label>
</td>
</tr>
<tr>
<td colspan="2">
<strong>Your IP Address is </strong>
</td>
<td colspan="2">
<asp:label id="Label1" runat="server"></asp:label>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
<asp:button height="26px" id="Button1" onclick="Button1_Click" runat="server" style="font-weight: 700;" text="Vote" width="97px">
</asp:button></td>
</tr>
</table>
<asp:panel height="112px" id="Panel1" runat="server">
<asp:label font-bold="True" font-italic="True" font-size="XX-Large" forecolor="#993300" id="Label2" runat="server" text="Thanks For Casting Your Vote...."></asp:label>
</asp:panel>
<br />
</div>
</asp:panel>
</form>
</body>
</html>--%>
Webform1.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
namespace BindDropDownWithImages
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Panel1.Visible = false;
BindDropDownList();
BindTitles();
lbltext.Text = ddlCountry.Items[0].Text;
}
}
private void BindTitles()
{
if (ddlCountry != null)
{
foreach (ListItem li in ddlCountry.Items)
{
li.Attributes["title"] = "Images/" + li.Value; // setting text value of item as tooltip
}
}
}
private void BindDropDownList()
{
//DataTable objdt = new DataTable();
//objdt = GetDataForChart();
//ddlCountry.DataSource = objdt;
//ddlCountry.DataTextField = "Actor";
//ddlCountry.DataValueField = "Id";
//ddlCountry.DataBind();
SqlConnection con = new SqlConnection("Data Source=GOKUL-PC\\GOKUL;Initial Catalog=Test;Integrated Security=true");
con.Open();
SqlCommand cmd = new SqlCommand("select * from ActorVotings", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
ddlCountry.DataTextField = "ActorName";
ddlCountry.DataValueField = "ActorImage";
ddlCountry.DataSource = ds;
ddlCountry.DataBind();
con.Close();
}
protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
{
lbltext.Text = ddlCountry.SelectedItem.Text;
BindTitles();
if (lbltext.Text.Contains("rajini"))
{
Panelp.BackImageUrl = "~/Images/rajinifull.jpg";
}
else if(lbltext.Text.Contains("vijay"))
{
Panelp.BackImageUrl = "~/Images/vijayfull.jpg";
}
else if(lbltext.Text.Contains("kamal"))
{
Panelp.BackImageUrl = "~/Images/kamlfull.jpg";
}
else if(lbltext.Text.Contains("ajith"))
{
Panelp.BackImageUrl = "~/Images/ajithfull.png";
}
else if (lbltext.Text.Contains("vikram"))
{
Panelp.BackImageUrl = "~/Images/vikramfull.jpg";
}
}
public DataTable GetDataForChart()
{
DataTable dt = new DataTable();
dt.Columns.Add("Actor", typeof(string));
dt.Columns.Add("Id", typeof(string));
dt.Columns.Add("LabelValue");
var _objrow = dt.NewRow();
_objrow["Actor"] = "rajini";
_objrow["Id"] = "rajini.jpg";
dt.Rows.Add(_objrow);
_objrow = dt.NewRow();
_objrow["Actor"] = "kamal";
_objrow["Id"] = "kamal.jpg";
dt.Rows.Add(_objrow);
_objrow = dt.NewRow();
_objrow["Actor"] = "vijay";
_objrow["Id"] = "vijay.jpg";
dt.Rows.Add(_objrow);
_objrow = dt.NewRow();
_objrow["Actor"] = "ajith";
_objrow["Id"] = "ajith.jpg";
dt.Rows.Add(_objrow);
_objrow = dt.NewRow();
_objrow["Actor"] = "vikram";
_objrow["Id"] = "vikram.jpg";
dt.Rows.Add(_objrow);
return dt;
}
protected void Button1_Click(object sender, EventArgs e)
{
Panel1.Visible = true;
}
}
}
Monday, 20 June 2016
Simple-encrypting-and-decrypting-data-in-C#
http://www.codeproject.com/Articles/5719/Simple-encrypting-and-decrypting-data-in-C#
Thursday, 16 June 2016
C3
http://www.c-sharpcorner.com/code/2827/c-sharp-program-to-shutdown-or-turn-off-computer.aspx
http://www.c-sharpcorner.com/code/2700/read-excel-file-without-microsoft-jet-oledb-4-0-reference-file-saveas-or-excel.aspx
http://www.c-sharpcorner.com/code/2711/simple-bus-traffic-simulation-with-information-service.aspx
http://www.c-sharpcorner.com/article/train-wreck-pattern-cascade-method-pattern-in-C-Sharp/
http://www.c-sharpcorner.com/article/silent-installation-of-applications-using-C-Sharp/
http://www.c-sharpcorner.com/article/sending-sms-using-C-Sharp-application/
http://www.c-sharpcorner.com/code/2085/send-image-audio-video-and-message-from-c-sharp-to-whatsapp.aspx
http://www.c-sharpcorner.com/code/2048/desktop-activity-recording.aspx
http://www.c-sharpcorner.com/UploadFile/87b416/why-we-should-prefer-to-use-dispose-method-then-finalize-met/
http://www.c-sharpcorner.com/blogs/communicate-with-whatsapp-from-website-in-c-sharp1
http://www.c-sharpcorner.com/code/2700/read-excel-file-without-microsoft-jet-oledb-4-0-reference-file-saveas-or-excel.aspx
http://www.c-sharpcorner.com/code/2711/simple-bus-traffic-simulation-with-information-service.aspx
http://www.c-sharpcorner.com/article/train-wreck-pattern-cascade-method-pattern-in-C-Sharp/
http://www.c-sharpcorner.com/article/silent-installation-of-applications-using-C-Sharp/
http://www.c-sharpcorner.com/article/sending-sms-using-C-Sharp-application/
http://www.c-sharpcorner.com/code/2085/send-image-audio-video-and-message-from-c-sharp-to-whatsapp.aspx
http://www.c-sharpcorner.com/code/2048/desktop-activity-recording.aspx
http://www.c-sharpcorner.com/UploadFile/87b416/why-we-should-prefer-to-use-dispose-method-then-finalize-met/
http://www.c-sharpcorner.com/blogs/communicate-with-whatsapp-from-website-in-c-sharp1
Wednesday, 15 June 2016
windows appln
http://www.c-sharpcorner.com/uploadfile/b4f4a4/birthday-reminder-in-C-Sharp/
http://www.c-sharpcorner.com/uploadfile/krishnasarala/transfer-files-over-bluetooth-devices/
http://www.c-sharpcorner.com/UploadFile/1b29b1/hotel-menu-application-in-windows-C-Sharp/
http://www.c-sharpcorner.com/uploadfile/leokoach/virtual-photo-album-in-C-Sharp/
http://www.c-sharpcorner.com/UploadFile/thiagu304/remote-desktop-using-C-Sharp-net/
http://www.c-sharpcorner.com/uploadfile/scottlysle/parsing-sentences-and-building-text-statics-in-C-Sharp/
http://www.c-sharpcorner.com/article/mapping-with-a-gps-and-C-Sharp/
http://www.c-sharpcorner.com/article/build-a-simple-watermarking-utility-in-C-Sharp/
http://www.c-sharpcorner.com/article/simple-application-to-zip-and-unzip-files-in-C-Sharp-using-jsharp-lib/
http://www.c-sharpcorner.com/article/monitor-internet-connection-state/
http://www.c-sharpcorner.com/article/led-control-emulation/
http://www.c-sharpcorner.com/article/a-simple-approach-to-product-activation/
http://www.c-sharpcorner.com/article/file-splitter-in-net/
http://www.c-sharpcorner.com/article/analog-clock-widget-in-C-Sharp/
http://www.c-sharpcorner.com/article/mortgage-calculator-in-C-Sharp-and-net/
http://www.c-sharpcorner.com/article/advertising-board/
http://www.c-sharpcorner.com/article/playing-avi-files-using-directx-9-with-C-Sharp-and-net/
http://www.c-sharpcorner.com/article/im-chat-interface-for-C-Sharp-and-net/
http://www.c-sharpcorner.com/article/key-logger-application-in-C-Sharp/
http://www.c-sharpcorner.com/article/a-quiz-application-using-windows-form/
http://www.c-sharpcorner.com/article/interactive-shaped-forms/
http://www.c-sharpcorner.com/blogs/find-latitude-and-longitude-of-a-system
http://www.c-sharpcorner.com/UploadFile/df5827/create-whatsapp-messenger-in-windows-form-application/
http://www.c-sharpcorner.com/blogs/get-all-installed-languages-on-computer-and-set-selected-language-as-input-language-in-winform
http://www.c-sharpcorner.com/UploadFile/302f8f/creating-own-web-browser-in-C-Sharp/
http://www.c-sharpcorner.com/UploadFile/asmabegam/audiovideo-and-youtube-video-player-C-Sharp-winform/
http://www.c-sharpcorner.com/UploadFile/pandeypradip/testing-of-push-notification-using-windows-form-application/
http://www.c-sharpcorner.com/UploadFile/996353/create-setup-and-deployment-project-in-visual-studio-200820/
http://www.c-sharpcorner.com/UploadFile/996353/create-setup-and-deployment-project-in-visual-studio-200820/
http://www.c-sharpcorner.com/blogs/sql-injection-in-windows-forms-application1
http://www.c-sharpcorner.com/UploadFile/deepak.sharma00/how-to-play-flash-in-windows-forms-application-using-C-Sharp/
http://www.c-sharpcorner.com/blogs/collections-in-c-sharp
http://www.c-sharpcorner.com/uploadfile/krishnasarala/transfer-files-over-bluetooth-devices/
http://www.c-sharpcorner.com/UploadFile/1b29b1/hotel-menu-application-in-windows-C-Sharp/
http://www.c-sharpcorner.com/uploadfile/leokoach/virtual-photo-album-in-C-Sharp/
http://www.c-sharpcorner.com/UploadFile/thiagu304/remote-desktop-using-C-Sharp-net/
http://www.c-sharpcorner.com/uploadfile/scottlysle/parsing-sentences-and-building-text-statics-in-C-Sharp/
http://www.c-sharpcorner.com/article/mapping-with-a-gps-and-C-Sharp/
http://www.c-sharpcorner.com/article/build-a-simple-watermarking-utility-in-C-Sharp/
http://www.c-sharpcorner.com/article/simple-application-to-zip-and-unzip-files-in-C-Sharp-using-jsharp-lib/
http://www.c-sharpcorner.com/article/monitor-internet-connection-state/
http://www.c-sharpcorner.com/article/led-control-emulation/
http://www.c-sharpcorner.com/article/a-simple-approach-to-product-activation/
http://www.c-sharpcorner.com/article/file-splitter-in-net/
http://www.c-sharpcorner.com/article/analog-clock-widget-in-C-Sharp/
http://www.c-sharpcorner.com/article/mortgage-calculator-in-C-Sharp-and-net/
http://www.c-sharpcorner.com/article/advertising-board/
http://www.c-sharpcorner.com/article/playing-avi-files-using-directx-9-with-C-Sharp-and-net/
http://www.c-sharpcorner.com/article/im-chat-interface-for-C-Sharp-and-net/
http://www.c-sharpcorner.com/article/key-logger-application-in-C-Sharp/
http://www.c-sharpcorner.com/article/a-quiz-application-using-windows-form/
http://www.c-sharpcorner.com/article/interactive-shaped-forms/
http://www.c-sharpcorner.com/blogs/find-latitude-and-longitude-of-a-system
http://www.c-sharpcorner.com/UploadFile/df5827/create-whatsapp-messenger-in-windows-form-application/
http://www.c-sharpcorner.com/blogs/get-all-installed-languages-on-computer-and-set-selected-language-as-input-language-in-winform
http://www.c-sharpcorner.com/UploadFile/302f8f/creating-own-web-browser-in-C-Sharp/
http://www.c-sharpcorner.com/UploadFile/asmabegam/audiovideo-and-youtube-video-player-C-Sharp-winform/
http://www.c-sharpcorner.com/UploadFile/pandeypradip/testing-of-push-notification-using-windows-form-application/
http://www.c-sharpcorner.com/UploadFile/996353/create-setup-and-deployment-project-in-visual-studio-200820/
http://www.c-sharpcorner.com/UploadFile/996353/create-setup-and-deployment-project-in-visual-studio-200820/
http://www.c-sharpcorner.com/blogs/sql-injection-in-windows-forms-application1
http://www.c-sharpcorner.com/UploadFile/deepak.sharma00/how-to-play-flash-in-windows-forms-application-using-C-Sharp/
http://www.c-sharpcorner.com/blogs/collections-in-c-sharp
Wednesday, 1 June 2016
asd
http://stackoverflow.com/questions/26354472/how-can-i-get-users-location-without-asking-for-the-permission-or-if-user-permi
Subscribe to:
Posts (Atom)