15,896,557 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by suma2212 (Top 30 by date)
suma2212
25-Mar-13 3:48am
View
sorry for the trouble i am using this
SqlDataReader dr = command.ExecuteReader();
while (dr.Read())
{
if (dr["emailId"].ToString() !=txtenrEmail.Text)
{
Label1.Text = "Emailid already exists. Use another EmailId";
}
else
{
Label1.Text = "User details Inserted successfully";
}
}
String strQuery = "";
SqlConnection mySqlConnection = new SqlConnection(str);
strQuery += "update PersonalDetails set EnrolmentNo= ('CD' + ' " + dr["userid"].ToString() + " ') where userid = ' " + Convert.ToInt32(dr["userid"]) + " ' ";
SqlCommand com = new SqlCommand(strQuery, mySqlConnection);
mySqlConnection.Open();
com.ExecuteNonQuery();
mySqlConnection.Close();
con.Close();
please check it once......
suma2212
25-Mar-13 3:16am
View
i want to read 2 values userid and emailid. so i used sql reader.... please check above code...
suma2212
25-Mar-13 3:03am
View
ya i got it.thanx for ur help......
is this code correct?
while (dr.Read())
{
if (dr["emailId"].ToString() !=txtenrEmail.Text)
{
Label1.Text = "User details Inserted successfully";
}
else
{
Label1.Text = "Emailid already exists. Use another EmailId";
}
}
if that emailid is already exists i got this message
Label1.Text = "Emailid already exists. Use another EmailId";
and emailid not exists also i am getting same message..
please help me..
suma2212
25-Mar-13 2:38am
View
Hi i used if(dr.HasRows)
{
}
but i got this error
Object cannot be cast from DBNull to other types.
please help me.......
suma2212
6-Mar-13 8:06am
View
<tr>
<td class="style7" >
User Name</td>
<td >
<asp:TextBox ID="txtUsername" runat="server">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtUsername" ErrorMessage="*" ValidationGroup="submit">
</td>
</tr>
<!-- password -->
<tr>
<td class="style7" >
Password</td>
<td >
<asp:TextBox ID="txtpwd" runat="server" TextMode="Password">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtpwd" ErrorMessage="*" ValidationGroup="submit">
</td>
</tr>
<tr>
<td class="style8" colspan="2">
<asp:ImageButton ID="ImageButton2" runat="server"
ImageUrl="http://localhost:3072/HAI/UserAdmin/Images/btns_24.jpg" onclick="ImageButton2_Click"
ValidationGroup="submit" />
</td>
</tr>
<tr>
<td class="style7" colspan="2" >
<asp:Label ID="Label1" runat="server" Font-Size="Small" ForeColor="#CC0000">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div></div></div>
<!-- END subscribe popup-->
</form>
</body>
</html>
view code:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request.QueryString["userid"] == null)
{
//this.Button1.OnClientClick = "javascript:('Button1','')";
this.Button1.Attributes.Add("OnClientClick", "javascript:test();");
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Request.QueryString["userid"] != null)
{
SqlConnection con = new SqlConnection(str);
SqlCommand com = new SqlCommand("Hai_insertstorydetailes", con);
con.Open();
com.CommandType = CommandType.StoredProcedure;
com.Parameters.Add("@userId", Request.Cookies["userId"].Value.ToString());
if (Request.QueryString["StoryId"] != null)
{
com.Parameters.Add("@Id", Request.QueryString["StoryId"].ToString());
}
com.Parameters.Add("@Headline", txtheadline.Text);
com.Parameters.Add("@WriteStory", txtstory.Text);
com.Parameters.Add("@Destination", txtdestination.Text);
com.Parameters.Add("@Date", txtdate.Text);
com.ExecuteNonQuery();
con.Close();
}
else
{
}
this code working for hyperlink. but when i apply to button its not working...
when i submit review if user logged in it will save in db. other modelpodel popup window will open and when i submit user credentials it will go to that review page.
please help me........
suma2212
6-Mar-13 8:01am
View
Hi i used this code
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Show Popup for your website users to Subscribe using jQuery</title>
<!-- Color Box CSS -->
<link media="screen" rel="stylesheet" target="_blank" href="css/colorbox.css" />
<!-- Style For the Subscription Box -->
<link media="screen" rel="stylesheet" target="_blank" href="css/popup.css" />
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script>
<script language="javascript" src="js/colorbox.js"></script>
<script type="text/javascript">
function test()
{
alert('me');
return false;
}
</script>
<script type="text/javascript">
function test
{
$("document").ready(function() {
// load the overlay
if (document.cookie["userid".indexOf('visited=true') == -1) {
var fifteenDays = 1000 * 60 * 60 * 24 * 15;
var expires = new Date((new Date()).valueOf() + fifteenDays);
document.cookie = "visited=true;expires=" + expires.toUTCString();
$.colorbox({ width: "580px", inline: true, href: "#subscribe_popup" });
}
$(".open_popup").colorbox({ width: "850px", inline: true, href: "#subscribe_popup" });
});
}
</script>
<script type="text/javascript">
$("document").ready(function() {
// load the overlay
if (document.cookie.indexOf('visited=true') == -1) {
var fifteenDays = 1000 * 60 * 60 * 24 * 15;
var expires = new Date((new Date()).valueOf() + fifteenDays);
document.cookie = "visited=true;expires=" + expires.toUTCString();
$.colorbox({ width: "580px", inline: true, href: "#subscribe_popup" });
}
$(".open_popup").colorbox({ width: "850px", inline: true, href: "#subscribe_popup" });
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
headline
<asp:TextBox ID="txtheadline" runat="server">
<br />
write story
<asp:TextBox ID="txtstory" runat="server">
<br />
destination <asp:TextBox ID="txtdestination" runat="server">
<br />
date
<asp:TextBox ID="txtdate" runat="server">
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" style="width: 56px" Text="Button" />
</div>
<div align="center">
Click here to open the popup
</div>
<!-- This contains the hidden content for inline calls for the subscribe box -->
<div style='display:none'>
<div id='subscribe_popup' style='padding:10px;' runat="server">
<div style="width:95%;margin:10px; background-color:White;">
<div style="float:left;width:45%;">
<asp:Panel ID="pnldrag" runat="server" Width="402px" >
<table style="height: 338px; width: 100%" >
<tr>
<td style="color: Black; margin:auto;" class="style5">
<span style="font-size: 14pt;margin:auto;"><br />
Login
<br />
<span style="font-size: 14pt"><span style="font-size: 12pt">
<br />
Have a Facebook Account?<div id="auth-status">
<div ID="auth-loggedout">
<div autologoutlink="true" class="fb-login-button" scope="email,user_checkins">
Login with Facebook</div>
</div>
<div ID="auth-loggedin" style="display: none">
Hi, <span id="auth-displayname"></span>(
logout
)
</div>
</div>
</span></span></span>
</td>
</tr>
<tr>
<td class="style5">
<table border="0p
suma2212
6-Mar-13 7:54am
View
Deleted
Hi,
i used this code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Show Popup for your website users to Subscribe using jQuery</title>
<!-- Color Box CSS -->
<link media="screen" rel="stylesheet" target="_blank" href="css/colorbox.css" />
<!-- Style For the Subscription Box -->
<link media="screen" rel="stylesheet" target="_blank" href="css/popup.css" />
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script>
<script language="javascript" src="js/colorbox.js"></script>
<script type="text/javascript">
function test()
{
alert('me');
return false;
}
</script>
<script type="text/javascript">
function test
{
$("document").ready(function() {
// load the overlay
if (document.cookie["userid".indexOf('visited=true') == -1) {
var fifteenDays = 1000 * 60 * 60 * 24 * 15;
var expires = new Date((new Date()).valueOf() + fifteenDays);
document.cookie = "visited=true;expires=" + expires.toUTCString();
$.colorbox({ width: "580px", inline: true, href: "#subscribe_popup" });
}
$(".open_popup").colorbox({ width: "850px", inline: true, href: "#subscribe_popup" });
});
}
</script>
<script type="text/javascript">
$("document").ready(function() {
// load the overlay
if (document.cookie.indexOf('visited=true') == -1) {
var fifteenDays = 1000 * 60 * 60 * 24 * 15;
var expires = new Date((new Date()).valueOf() + fifteenDays);
document.cookie = "visited=true;expires=" + expires.toUTCString();
$.colorbox({ width: "580px", inline: true, href: "#subscribe_popup" });
}
$(".open_popup").colorbox({ width: "850px", inline: true, href: "#subscribe_popup" });
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
headline
<asp:TextBox ID="txtheadline" runat="server">
<br />
write story
<asp:TextBox ID="txtstory" runat="server">
<br />
destination <asp:TextBox ID="txtdestination" runat="server">
<br />
date
<asp:TextBox ID="txtdate" runat="server">
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" style="width: 56px" Text="Button" />
</div>
<div align="center">
Click here to open the popup
</div>
<!-- This contains the hidden content for inline calls for the subscribe box -->
<div style='display:none'>
<div id='subscribe_popup' style='padding:10px;' runat="server">
<div style="width:95%;margin:10px; background-color:White;">
<div style="float:left;width:45%;">
<asp:Panel ID="pnldrag" runat="server" Width="402px" >
<table style="height: 338px; width: 100%" >
<tr>
<td style="color: Black; margin:auto;" class="style5">
<span style="font-size: 14pt;margin:auto;"><br />
Login
<br />
<span style="font-size: 14pt"><span style="font-size: 12pt">
<br />
Have a Facebook Account?<div id="auth-status">
<div ID="auth-loggedout">
<div autologoutlink="true" class="fb-login-button" scope="email,user_checkins">
Login with Facebook</div>
</div>
<div ID="auth-loggedin" style="display: none">
Hi, <span id="auth-displayname"></span>(
logout
)
</div>
</div>
</span><
suma2212
22-Jan-13 0:55am
View
hi, can I send an email before 3 days to user with out using window services?
suma2212
21-Jan-13 23:48pm
View
Hi i am getting the error.
objTimer.Elapsed += new ElapsedEventHandler(objTimer_Elapsed);
even i add new System.Timers.ElapsedEventHandler(objTimer_Elapsed); to that line i am getting the same error in "objtimer.Elapsed +".
please help me.....
suma2212
18-Jan-13 1:12am
View
Hi i did all those things. while run the service i am getting the error like "web services1 service are in local system started and then stopped. and some services stop automatically if they are not in use by other services or programs".
eventviewer--->custom views ---> administrative events--> i am getting some error
while click the error i am getting this message.
"Service cannot be started. System.ArgumentException: Source property was not set before writing to the event log.
at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String message)
at sendingmail.Service1.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)"
please help me
suma2212
17-Jan-13 6:34am
View
Hi i am getting the error in this line
objTimer.Elapsed += new ElapsedEventHandler(objTimer_Elapsed);
does not contain a method for 'Elapsed'. and no extention method for 'Elapsed'.
please tell me the where i did the mistake.
suma2212
17-Jan-13 4:52am
View
In that above url shows---> vs2010-->newprject-->wondows service.
But i am using asp.net and C#.net
vs 2008--> new website-->
i am not getting the windows service.
please give me the answer
suma2212
17-Jan-13 2:38am
View
i am using .net 3.5. in that toolbox not shows components ---> eventlog plz give any suggetion to me
suma2212
16-Jan-13 23:58pm
View
Hi thanks for ur help.
my toolbox i didn't get eventlog and objtimer. please explained me.
suma2212
16-Jan-13 7:33am
View
how to declare eventlog1,objtimer
suma2212
8-Jan-13 7:34am
View
sorry i dont have live website links.
what i am saying is like that url is shared in facebook not that album. how can i connect that album and facebook share button.
i want to share the album in facebook.
suma2212
8-Jan-13 6:59am
View
HI,
i tried this. but i am getting the whole page not album it shows whole page like
http://localhost:2361/HAI/Albums.aspx?userId=71.
suma2212
8-Jan-13 6:36am
View
Hi Tadit,
thanks for ur help. you helped me a lot.
i want to share that album in to facebook. is it possible to do this.
i am new of asp.net.
suma2212
7-Jan-13 0:45am
View
Hi,
how to write query for sharing please help me.
and
how can i set default photo for album. i have defaultphotoid column in my tbl_albums table.
please help me
suma2212
27-Dec-12 0:27am
View
Hi i am not using asp.net 4.5, i am using asp.net 2.0
suma2212
26-Dec-12 4:01am
View
Hi thanks for ur help. In above example i did all.i have my tbl_userprofile table in that friends column is there. when i add friend, their userid's will add to that column(ex: 12,13,14). when i click share button how can i share photos. i did what u told but i didn't get the proper solution please help me. its very urgent.
suma2212
20-Dec-12 5:25am
View
Hi,
thanq for ur answer. i have one doubt i am using asp.net 2.0, is it possible to create webservices in asp.net 2.o?
please send code for gmail. i am using gmail not outlook
suma2212
20-Dec-12 2:25am
View
Hi thanq for ur reply. My TL changed this requirement. first we have to create an album,in down of that album insert share button. when i click share button that album will shared to all his friends.
please give me any idea, and please give any example.
suma2212
20-Dec-12 2:20am
View
Hi i am using ASP.net 2.0 ,C# and sql server 2005
suma2212
19-Dec-12 3:54am
View
Hi Tadit,
For this i am using Datalist. in that datalist i add image button. in that down of the image button i insert Link button (share). when i click that share link button it will display all my friends list.
please help me
suma2212
19-Dec-12 3:49am
View
Hi Tadit,
thank you for your answer. i want query and asp.net code for this functionality. please provide me. i tried it but i did not get the correct solution.
please help me....
suma2212
11-Dec-12 0:20am
View
Hi Vani Kulkarni,
I tried this code
dst.Relations.Add("Children",
dst.Tables["tbl_productcatagory"].Columns["catid"],
dst.Tables["tbl_productsubcatagory"].Columns["catid"], false);
But i am not getting the child values...
suma2212
11-Dec-12 0:04am
View
I am getting the error from this code
DataSet GetMenuData()
{
SqlConnection con = new SqlConnection(str);
SqlDataAdapter dadCats = new SqlDataAdapter("SELECT catid, catname,productid FROM tbl_productcatagory where productid=1", con);
SqlDataAdapter dadProducts = new SqlDataAdapter("SELECT subcatid, catid, subcatagoryname FROM tbl_productsubcatagory ", con);
DataSet dst = new DataSet();
dadCats.Fill(dst, "tbl_productcatagory");
dadProducts.Fill(dst, "tbl_productsubcatagory");
dst.Relations.Add("Children",
dst.Tables["tbl_productcatagory"].Columns["catid"],
dst.Tables["tbl_productsubcatagory"].Columns["catid"]);
return dst;
}
in this without productid=1 it is not showing any error when i use product id i am getting error from this code. but i need to provide product id otherwise it displays all product catagories
dst.Relations.Add("Children",
dst.Tables["tbl_productcatagory"].Columns["catid"],
dst.Tables["tbl_productsubcatagory"].Columns["catid"]);
suma2212
11-Dec-12 0:02am
View
Deleted
I am getting the error from this code
DataSet GetMenuData()
{
SqlConnection con = new SqlConnection(str);
SqlDataAdapter dadCats = new SqlDataAdapter("SELECT catid, catname,productid FROM tbl_productcatagory where productid=1", con);
SqlDataAdapter dadProducts = new SqlDataAdapter("SELECT subcatid, catid, subcatagoryname FROM tbl_productsubcatagory ", con);
DataSet dst = new DataSet();
dadCats.Fill(dst, "tbl_productcatagory");
dadProducts.Fill(dst, "tbl_productsubcatagory");
dst.Relations.Add("Children",
dst.Tables["tbl_productcatagory"].Columns["catid"],
dst.Tables["tbl_productsubcatagory"].Columns["catid"]);
return dst;
}
in this without productid=1 it is not showing any error when i use product id i am getting error from this code. but i need to provide product id otherwise it displays all product catagories
dst.Relations.Add("Children",
dst.Tables["tbl_productcatagory"].Columns["catid"],
dst.Tables["tbl_productsubcatagory"].Columns["catid"]);
suma2212
28-Nov-12 2:12am
View
Deleted
Hi i have a computer service center, i want any open source ticket raising system for my computer service center. in that any customer will come to my center for service we will give the token id for that computer. using that id they will check their status. please give any any idea.
Show More