15,911,360 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 Member 9376025 (Top 30 by date)
Member 9376025
19-Oct-12 8:04am
View
sql server
can u plz sugesst me the code for update..
Member 9376025
17-Oct-12 7:32am
View
yes in facebook "like"..can sugesstme code..
Member 9376025
17-Oct-12 7:32am
View
my question is in facebook there is "like" link na.for that i want code..
Member 9376025
28-Sep-12 6:50am
View
for the above i want to retrieve the data in gridview..
Member 9376025
21-Sep-12 5:20am
View
vaishnav.what is the lazy loading concept.you can explain me..
Member 9376025
21-Sep-12 5:09am
View
i used the above code but the secondpage data is displaying upto 10..and on clicking 3rd page all the records is displaying..
Member 9376025
14-Sep-12 4:26am
View
ya i used ExecuteReader(),
but not coming..
is there any changes in code..
Member 9376025
14-Sep-12 2:37am
View
not by letters like stars it can display..
Member 9376025
8-Sep-12 6:55am
View
thanks..
Member 9376025
8-Sep-12 6:31am
View
I solved my problem..
in the above code
insted of this two lines
TextBox txtcity = (TextBox)row.FindControl("lbleditcity");
TextBox txtDesignation = (TextBox)row.FindControl("lbleditdesignation");
replace this lines
TextBox txtcity = (TextBox)row.FindControl("txteditcity");
TextBox txtDesignation = (TextBox)row.FindControl("txteditdesignation");
Member 9376025
8-Sep-12 6:18am
View
Thanks alot TR..
Member 9376025
8-Sep-12 1:12am
View
i changed the code as above but the same error is coming....
"Object reference not set to an instance of an object."
Can u help me...
Member 9376025
7-Sep-12 7:23am
View
there is no null value for id,text,designation
Member 9376025
7-Sep-12 7:12am
View
ya in gvdetails_rowUpdating the error line is
SqlCommand cmd=new SqlCommand("update from GridDetails set City='"+txtcity.Text+"',Designation='"+txtDesignation.Text+"' where Userid="+userid,con);
Member 9376025
7-Sep-12 7:05am
View
i changed there bindgridview();
then clicking on update button the error is occured "Object reference not set to an instance of an object."
Member 9376025
7-Sep-12 7:04am
View
no by cliking edit button all table desapear..
Member 9376025
5-Sep-12 6:43am
View
thanks prasad
Member 9376025
5-Sep-12 4:47am
View
both...
Member 9376025
5-Sep-12 4:37am
View
i did same code .but i want to display here image in gridview
Member 9376025
3-Sep-12 3:23am
View
Deleted
can u give u ur mailid
i will send my project to u..
Member 9376025
3-Sep-12 3:03am
View
this is all my pages..what i have used as with database admin page: As source page ie.,aspx <tr> <td> Select Type </td> <td> : </td> <td width="150"> <asp:DropDownList ID="ddltype" AppendDataBoundItems="true" runat="server" SkinID="DDListNormalRequired" Width="170px"> <asp:ListItem Value="-1">Select <asp:ListItem >Family <asp:ListItem>Friends <asp:ListItem>others </td> </tr> <tr> <td>Enter Name</td> <td> : </td> <td> <asp:TextBox ID="txtName" runat="server" Width="170px"> </td> </tr> <tr> <td>SelectImage</td> <td> : </td> <td> <asp:FileUpload ID="FileUpload1" runat="server" /> </td> </tr> <tr> <td> <asp:Button ID="btnInsert" runat="server" Text="Insert" Width="100" onclick="btnInsert_Click"/> </td> </tr> now aspx.cs page SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["sss"].ConnectionString); protected void Page_Load(object sender, EventArgs e) { } protected void btnInsert_Click(object sender, EventArgs e) { try { string s = FileUpload1.PostedFile.FileName; string a = Server.MapPath(".")+"//images//"; FileUpload1.SaveAs(a + s); string imagepath = "Admin/images/" + s; SqlCommand cmd = new SqlCommand("type", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@selecttype", ddltype.Text); cmd.Parameters.AddWithValue("@entername ", txtName.Text); cmd.Parameters.Add("@imagepath ", imagepath); con.Open(); cmd.ExecuteNonQuery(); con.Close(); //Response.Redirect("~Default2.aspx"); } catch(Exception ex) { throw ex; } second page <div> <asp:DataList ID="DataList1" runat="server"> <asp:HyperLink ID="family" runat="server" Navigateurl='<%#"Default2.aspx?Id="+DataBinder.Eval(Container.DataItem,"id").ToString()+""%>' Text='<%#Eval("names") %>'> </div> aspx.cs page protected void Page_Load(object sender, EventArgs e) { fillgroups(); } private void fillgroups() { string s = "select * from groups "; SqlDataAdapter da = new SqlDataAdapter(s, con); DataSet ds = new DataSet(); da.Fill(ds,"groups"); DataList1.DataSource = ds.Tables[0]; DataList1.DataBind(); } thrid page <td> <asp:CheckBox ID="CheckBox2" runat="server" Text="Family" Width="170px" /> </td> </tr> <tr> <td> <asp:CheckBox ID="CheckBox1" runat="server" Text="Friends" Width="170px" Height="21px"/> </td> </tr> <tr> <td> <asp:CheckBox ID="CheckBox3" runat="server" Text="Others" Width="170px"/> </td> </tr> <tr> <td> <asp:Button ID="btnDelete" runat="server" Text="Delete" onclick="btnDelete_Click" /> </td> </tr> for thrid page i want C# code the database table is Family varchar(50) Checked Friends varchar(50) Checked Others varchar(50) Checked id int Checked name varbinary(50) Checked names varchar(MAX) Checked Selecttype varchar(50) Checked SelectName varchar(50) Checked SelectImage image Checked imagepath varchar(MAX) Checked Stored procedure code ALTER procedure [dbo].[details] @Family varchar(50), @Friends varchar(50), @Others varchar(50) as
Member 9376025
3-Sep-12 2:52am
View
can i post here my code...
can u help
Member 9376025
3-Sep-12 2:43am
View
this is all my pages..what i have used as with database
admin page:
As source page ie.,aspx
<tr>
<td>
Select Type
</td>
<td>
:
</td>
<td width="150">
<asp:DropDownList ID="ddltype" AppendDataBoundItems="true" runat="server" SkinID="DDListNormalRequired" Width="170px">
<asp:ListItem Value="-1">Select
<asp:ListItem >Family
<asp:ListItem>Friends
<asp:ListItem>others
</td>
</tr>
<tr>
<td>Enter Name</td>
<td>
:
</td>
<td>
<asp:TextBox ID="txtName" runat="server" Width="170px">
</td>
</tr>
<tr>
<td>SelectImage</td>
<td>
:
</td>
<td>
<asp:FileUpload ID="FileUpload1" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnInsert" runat="server" Text="Insert" Width="100"
onclick="btnInsert_Click"/>
</td>
</tr>
now aspx.cs page
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["sss"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnInsert_Click(object sender, EventArgs e)
{
try
{
string s = FileUpload1.PostedFile.FileName;
string a = Server.MapPath(".")+"//images//";
FileUpload1.SaveAs(a + s);
string imagepath = "Admin/images/" + s;
SqlCommand cmd = new SqlCommand("type", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@selecttype", ddltype.Text);
cmd.Parameters.AddWithValue("@entername ", txtName.Text);
cmd.Parameters.Add("@imagepath ", imagepath);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
//Response.Redirect("~Default2.aspx");
}
catch(Exception ex)
{
throw ex;
}
second page
<div>
<asp:DataList ID="DataList1" runat="server">
<itemtemplate>
<asp:HyperLink ID="family" runat="server" Navigateurl='<%#"Default2.aspx?Id="+DataBinder.Eval(Container.DataItem,"id").ToString()+""%>' Text='<%#Eval("names") %>'>
</div>
aspx.cs page
protected void Page_Load(object sender, EventArgs e)
{
fillgroups();
}
private void fillgroups()
{
string s = "select * from groups ";
SqlDataAdapter da = new SqlDataAdapter(s, con);
DataSet ds = new DataSet();
da.Fill(ds,"groups");
DataList1.DataSource = ds.Tables[0];
DataList1.DataBind();
}
thrid page
<td>
<asp:CheckBox ID="CheckBox2" runat="server" Text="Family" Width="170px" />
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="CheckBox1" runat="server" Text="Friends" Width="170px"
Height="21px"/>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="CheckBox3" runat="server" Text="Others" Width="170px"/>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnDelete" runat="server" Text="Delete"
onclick="btnDelete_Click" />
</td>
</tr>
for thrid page i want C# code
the database table is
Family varchar(50) Checked
Friends varchar(50) Checked
Others varchar(50) Checked
id int Checked
name varbinary(50) Checked
names varchar(MAX) Checked
Selecttype varchar(50) Checked
SelectName varchar(50) Checked
SelectImage image Checked
imagepath varchar(MAX) Checked
Stored procedure code
ALTER procedure [dbo].[details]
@Family varchar(50),
@Friends varchar(50),
@Others varchar(50)
as
Member 9376025
3-Sep-12 2:35am
View
i want with out gridview
Member 9376025
3-Sep-12 2:35am
View
not using gridview
Member 9376025
29-Aug-12 4:11am
View
hii
iam using the above site by that geting error i gridview as last line..
Member 9376025
25-Aug-12 7:38am
View
i want just for values..for this iwant source code and C# code can u
Member 9376025
25-Aug-12 7:31am
View
thanku
Member 9376025
23-Aug-12 4:10am
View
thanx
Member 9376025
23-Aug-12 3:36am
View
connection.close()
Show More