15,899,679 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 Tarun Jaiswal (Top 33 by date)
Tarun Jaiswal
21-Nov-14 1:11am
View
this is not a Home Work, it is a curiosity to learn how this action is performed is there any in-built classes or every developer have to implement his own logic to achieve this Task.
& I currently did not understand how the value is calculated becaused i read some Articles on Internet there they say to create table with all numerical digit, some say go on dividing numbers with total digit count. I dont have a proper Logic how to calculate it.
Currently my required value upto Lakh only.
Thanks for your reply
Tarun Jaiswal
29-Sep-14 8:43am
View
Hello Mr.syed shanu above example work fine in windows Application.
but now m trying to make WPF application the StateInfo class is not access-able in login button. can you please guide me how i can maintain the userstate in WPF app.
Tarun Jaiswal
24-Sep-14 2:31am
View
ok thanks
Tarun Jaiswal
24-Sep-14 0:17am
View
yeah -SA
actually in combobox what ever value i place in it. it show that value twice
in the case of reply i have posted the source code according to that Extra Control is displayed twice first in combobox when i select it & second in dropdownlist.
so how i can remove/hide the Extra Control value which is displayed in dropdownlist,but not in combobox where user select the combobox
Tarun Jaiswal
23-Sep-14 12:17pm
View
I m just simply populating items in combobox at Window_Loaded event
private void Populatecombo()
{
cbProIcon.Items.Add("Extra Controls");
cbProIcon.Items.Add("Home");
cbProIcon.Items.Add("LogOut");
cbProIcon.Items.Add("Exit");
cbProIcon.Items.Add("Sleep");
cbProIcon.Items.Add("Shutdown");
cbProIcon.Items.Add("Restart");
cbProIcon.Items.Add("Lock");
cbProIcon.Items.Add("Logg Off");
cbProIcon.Items.Add("Hibernate");
cbProIcon.SelectedIndex = 0;
}
then on SelectionChanged event m providing some logic
if (cbProIcon.SelectedIndex == 1)
{
//Home
txtcheck.Text += "Home Button Now Clicked now.";
cbProIcon.SelectedIndex = 0;// m setting Index 0 so that Extra Control should always selected.
}
else if (cbProIcon.SelectedIndex == 2)
{
//LogOut
this.Close();
welcome.Show();
}
& so on
but on window when i select combobox it display like this
https://www.dropbox.com/s/azkclhuosm3u45t/combobox.jpg?dl=0
i want to display Extra Control to be display once.
Tarun Jaiswal
2-Jun-14 3:28am
View
my problem is that i m trying to print panel content on button click, when content is ready for printing i want header of Gridview to be printed on all page so that user don't have turn page again and again for searching what is this column name and also a page breaker at the end of the page so that content of gridview don't get cut in middle.
Now i m able to achieve this function with the above code in Internet Explore Browser but this exact code don't work in Chrome Browser why ? i dont know ....
Tarun Jaiswal
10-May-14 9:27am
View
NO i dnt what this type of coding work because when user login his password get hashed into "SHA1" algorithm by web.config then its get valid from my database which already store password in hashed format
Tarun Jaiswal
8-May-14 4:13am
View
thx buddie but m not interested in creating GLOBAL TABLE
and YES this query works well.
Tarun Jaiswal
8-May-14 3:46am
View
thanx it works.
Tarun Jaiswal
8-May-14 3:39am
View
thanx for your reply but this is not the desired output result
eg. i have a column name DateOfRecord datatype Date.
this DateOfRecord have YYYY-MM-DD but i want to get result output for YYYY-MM how i can achieve this ?
----------------------
DateofRecord | someotherField|
2014-01-15 | data
2014-01-20 | data
2014-01-21 | data
2014-01-22 | data
2014-01-30 | data
2014-02-15 | data
2014-02-15 | data
2014-02-15 | data
2014-03-15 | data
2014-03-15 | data
how i can retrieve data only for 2014-01 [YYYY-MM]?
Tarun Jaiswal
5-May-14 7:58am
View
yes i have binded radiobuttonlist with sql server it result all alphabet together but how i can separate each alphabet with each radio button.
and i dnt knw how to solve this with IEnumerable
Tarun Jaiswal
1-May-14 13:44pm
View
hmm all these is happeining because of form runat="server" many other fuctionality are also affected due to form.
is there any other way to include login menu on navbar ?
Tarun Jaiswal
1-May-14 11:58am
View
but with this solution i get into another issue which is when i click on dropdown login menu's textbox[username] is get toogle and m unable to enter username and password
Tarun Jaiswal
1-May-14 10:38am
View
yes now i understand what you were saying i got it thanks
Tarun Jaiswal
1-May-14 9:47am
View
yes your answer seems to be correct but this is not what solve my issue , in master pages navigation bar m takin login from user. this is my source html
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="usermaster.master.cs" Inherits="Society.usermaster" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Bootstrap Website</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="Styles/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="Styles/style.css" />
<asp:ContentPlaceHolder ID="head" runat="server">
</head>
<body>
<%--Start of navigation bar--%>
<div class="container">
Tarun Company
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">
Home
</li>
<li class="dropdown">
Social
<ul class="dropdown-menu">
<li>
Facebook
</li>
<li>
Twitter
</li>
<li>
Hi5
</li>
</ul>
</li>
<li>
Blog
</li>
<li>
Contact
</li>
<!--Start of dropdown menu login menu control -->
<li class="dropdown" id="menuLogin1">
Login Menu
<div class="dropdown-menu" style="padding: 10px;">
<form class="form-horizontal" role="form" id="loginform" runat="server">
<div class="form-group">
<div class="col-sm-10">
<asp:TextBox class="form-control" ID="txtemailid" runat="server" placeholder="Email ID">
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<asp:TextBox class="form-control" ID="txtpassword" runat="server" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<asp:Button class="btn btn-primary btn-block pull-right" ID="btnSubmit" runat="server" Text="Sign in" />
<br />
<br />
forget password ?
</div>
</div>
</form>
</div>
</li>
<!-- End of dropdown menu login menu control -->
</ul>
</div>
</div>
Tarun Jaiswal
30-Apr-14 10:37am
View
left outer join really help me
thank you
Tarun Jaiswal
30-Apr-14 10:34am
View
thx for your consideration.
i future i will take care of such things.
Tarun Jaiswal
30-Apr-14 10:33am
View
yes sir i knw naming convention and many other thing are not well because i thought them to improve them later and first focus on my core working of project.
thank you.
Tarun Jaiswal
29-Apr-14 6:34am
View
you can use this store procedure and .net code
CREATE PROC spUser
@Name NVARCHAR(100)
AS
BEGIN
DECLARE @Count INT
DECLARE @ReturnCode INT
SELECT @Count = COUNT(Name) FROM tblUsers WHERE Name = @Name
IF @Count > 0
BEGIN
SET @ReturnCode = - 1
END
ELSE
BEGIN
SET @ReturnCode = 1
INSERT INTO tblname_registry VALUES ( @Name )
END
SELECT @ReturnCode AS ReturnValue
END
// If the Page has no validation errors
if (Page.IsValid)
{
// Read the connection string from web.config.
// ConfigurationManager class is in System.Configuration namespace
string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
// SqlConnection is in System.Data.SqlClient namespace
using (SqlConnection con = new SqlConnection(CS))
{
SqlCommand cmd = new SqlCommand("spUser", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter username = new SqlParameter("@Name", txtName.Text);
cmd.Parameters.Add(name);
con.Open();
int ReturnCode = (int)cmd.ExecuteScalar();
if (ReturnCode == -1)
{
lblMessage.Text = "Name already in use, please choose another user name";
}
else
{
// whatever code you want to do can do here after successfull returning value
}
}
}
Tarun Jaiswal
28-Apr-14 11:30am
View
thx buddie
Tarun Jaiswal
2-Apr-14 1:53am
View
thx
Tarun Jaiswal
2-Apr-14 1:53am
View
yes done voting for both the post
Tarun Jaiswal
2-Apr-14 1:04am
View
thank you sir
Tarun Jaiswal
2-Apr-14 0:56am
View
this is link where i posted my question
http://www.codeproject.com/Questions/753317/How-I-Can-I-Sum-Bloodgroup-And-Show-Total-In-Datag
Tarun Jaiswal
1-Apr-14 13:20pm
View
thx you sir for solving my prob can you plz again solve this query with little modification this time i want to sum BloodGroup and show Total
----------------------------------------
A | B |AB| O | Total
----------------------------------------
3 | 2 |2 | 1 | 8
Tarun Jaiswal
30-Mar-14 2:35am
View
read my earlier post i have mention that if connection is opened do you understand,
there is logical error in code don't you see ?
the error part is this -----> int i = cmd1.ExecuteNonQuery();
she only have write this much of code -----> cmd1.ExecuteNonQuery();
if she store function in int i it will never execute it and there will be no affect in database.
do you get it ?
Tarun Jaiswal
19-Mar-14 10:37am
View
so what i can do solve to it ?
Tarun Jaiswal
17-Mar-14 13:00pm
View
ohh yes m greatfull to you you help me alot thanx
Tarun Jaiswal
17-Mar-14 7:00am
View
hey buddie thx its really works but due to change in codes m getting another error that is when user click on image icon a calender control is visible calender control contain dropdown ddlmonth which gets current month gives me error
Sub Populate_MonthList()
Try
'Add each month to the list
ddlmonth.Items.Add(New ListItem("January", " 1"))
ddlmonth.Items.Add(New ListItem("February", " 2"))
ddlmonth.Items.Add(New ListItem("March", " 3"))
ddlmonth.Items.Add(New ListItem("April", " 4"))
ddlmonth.Items.Add(New ListItem("May", " 5"))
ddlmonth.Items.Add(New ListItem("June", " 6"))
ddlmonth.Items.Add(New ListItem("July", " 7"))
ddlmonth.Items.Add(New ListItem("August", " 8"))
ddlmonth.Items.Add(New ListItem("September", " 9"))
ddlmonth.Items.Add(New ListItem("October", " 10"))
ddlmonth.Items.Add(New ListItem("November", " 11"))
ddlmonth.Items.Add(New ListItem("December", " 12"))
'Make the current month selected item in the list
' here m geting error
ddlmonth.Items.FindByValue(MonthName(DateTime.Now.Month)).Selected = True
Catch ex As Exception
lblerror.Text = ex.Message.ToString()
End Try
End Sub
error is Object reference not set to an instance of an object.
what i can do here
Tarun Jaiswal
17-Mar-14 4:14am
View
bro can you tell me how i can write this sql code in vb.net where in using dropdownlist for month as
Sub Populate_MonthList()
'Add each month to the list
ddlmonth.Items.Add("January")
ddlmonth.Items.Add("February")
ddlmonth.Items.Add("March")
ddlmonth.Items.Add("April")
ddlmonth.Items.Add("May")
ddlmonth.Items.Add("June")
ddlmonth.Items.Add("July")
ddlmonth.Items.Add("August")
ddlmonth.Items.Add("September")
ddlmonth.Items.Add("October")
ddlmonth.Items.Add("November")
ddlmonth.Items.Add("December")
'Make the current month selected item in the list
ddlmonth.Items.FindByValue(MonthName(DateTime.Now.Month)).Selected = True
End Sub
i want to write sql code in vb.net which is this
Select DATEPART(YEAR,Date) as [Year],DATEPART(Month,Date) as [Month] , EmployeeID from tblbill where MONTH(Date) = 2 and year(Date) = 2014
where ddlmonth use populate_Monthlist()
at runtime it give me error that
Conversion failed when converting the varchar value 'March' to data type int.
what i can do
Tarun Jaiswal
9-Mar-14 15:54pm
View
yes sir it work fine thanks .
Tarun Jaiswal
5-Mar-14 6:36am
View
hey bro thank you u r co-operating with me.
now i have just created a new project with same name and attribute you said actually just like your codes xerox copy but then also there is error
here snapshot of my screen
error screen
https://www.dropbox.com/s/f78bhtkpsbh6mvd/attendenceerror.png?m=
this is database screen
https://www.dropbox.com/s/7hrf085kmnd7uri/attendencedatabase.png
Tarun Jaiswal
2-Mar-14 7:15am
View
its windows form .resx lang written in vb.net
if you know solution then plz help me
Show More