15,911,035 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 pallavi ajin (Top 79 by date)
pallavi ajin
7-Apr-12 6:52am
View
ok thnx
pallavi ajin
7-Apr-12 6:41am
View
if i am using gridview in update panel then this code is not working.
pallavi ajin
7-Apr-12 6:21am
View
no button is outside, means on the page.if i will click on that button and gridview data change into excel sheet.and gridview is in the update panel
pallavi ajin
21-Oct-11 7:21am
View
tell me plz
pallavi ajin
21-Oct-11 6:55am
View
is it possible????will it show data in panel i m doing this on the the command event of linkbutton in geridview
pallavi ajin
21-Oct-11 6:54am
View
but i want to ask 1 thing actly i m showing data in the textboxes which are in panel according to the id of employee in gridview....
pallavi ajin
21-Oct-11 3:54am
View
its not the proper solution i knw how to use it but plz read my prob cmpltly
pallavi ajin
21-Oct-11 3:36am
View
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MakePayment.aspx.cs" Inherits="Salary_MakePayment" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.modalBackground
{
background-color: Gray;
filter: alpha(opacity=70);
opacity: 0.7;
cursor: wait;
}
.modalPopup
{
background-color: #EEEEEE;
border-width: 3px;
border-style: solid;
border-color: Gray;
font-family: Verdana;
font-size: medium;
padding: 3px;
width: 595px;
}
.parentDisable
{
z-index: 999;
width: 100%;
height: 100%;
display: none;
position: absolute;
top: 0;
left: 0;
background-color: #000;
color: #aaa;
opacity: .9;
filter: alpha(opacity=50);
}
#popup
{
width: 300;
height: 300;
position: relative;
color: #000;
background-color: #fff;
top: 25%;
background-image: url(catbg-1.gif);
}
</style>
<script type="text/javascript" language="javascript">
function pop(div) {
document.getElementById(div).style.display = 'block';
//return false
}
function hide(div) {
document.getElementById(div).style.display = 'none';
//return true
}
</script>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<table>
<tr>
<td>
From Date
</td>
<td>
<asp:TextBox ID="txtFromDate" runat="server">
<asp:CalendarExtender ID="txtFromDate_CalendarExtender" runat="server"
Enabled="True" TargetControlID="txtFromDate">
</td>
<td>
To Date
</td>
<td>
<asp:TextBox ID="txtToDate" runat="server">
<asp:CalendarExtender ID="txtToDate_CalendarExtender" runat="server"
Enabled="True" TargetControlID="txtToDate">
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
<asp:Button ID="btnSearch" runat="server" Text="Search"
onclick="btnSearch_Click"/>
</td>
</tr>
</table>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<asp:GridView ID="gv_Result" runat="server" AutoGenerateColumns="False">
<columns>
<asp:TemplateField HeaderText="Employee Code">
<itemtemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("emp_code") %>'>
<edititemtemplate>
<asp:Tex
pallavi ajin
21-Oct-11 3:35am
View
sir i want to show panel on the click of linkbutton, that linkbutton is used in the gridview.
pallavi ajin
18-Oct-11 4:01am
View
thnk u so much u solved my prob i m so happy thnk u
pallavi ajin
18-Oct-11 0:42am
View
tell me sir plz
pallavi ajin
18-Oct-11 0:33am
View
but in bind stmnt itys showing exception of object reference set to null
pallavi ajin
15-Oct-11 8:24am
View
i hv done thnx prob was in IsActive not in that...thnk u
pallavi ajin
15-Oct-11 1:03am
View
its not doing work giving an exception i.e. datatype missmatch
pallavi ajin
12-Oct-11 5:25am
View
now its editpage's coding
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;
using System.Configuration;
public partial class Employee_Default : System.Web.UI.Page
{
static string id = string.Empty;
string str ;
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["CRMConnectionString"].ConnectionString);
string seniorcode,branch;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SetInitialRow_ForFamily();
SetInitialRow_ForEMP();
SetInitialRow_ForEDU();
// id of selected employee....
str = Request.QueryString["id"].ToString();
if (str != null)
{
id = Request.QueryString["id"];
SqlDataAdapter adap = new SqlDataAdapter("select * from employee_info where emp_code='"+id+"'",con);
DataTable dt = new DataTable();
adap.Fill(dt);
txt_empcode0.Text = str;
txt_empname0.Text = dt.Rows[0]["emp_name"].ToString();
branch = dt.Rows[0]["Br_name"].ToString();
ddl_deportment.Text = dt.Rows[0]["dept_name"].ToString();
ddl_designation.Text = dt.Rows[0]["designation_name"].ToString();
txt_basicsal.Text = dt.Rows[0]["emp_sal"].ToString();
txt_doj.Text = dt.Rows[0]["emp_doj"].ToString();
txt_refrence.Text = dt.Rows[0]["emp_refrence"].ToString();
txt_empdob.Text = dt.Rows[0]["emp_dob"].ToString();
ddl_gender.Text = dt.Rows[0]["emp_gender"].ToString();
txt_empreligion.Text = dt.Rows[0]["emp_religion"].ToString();
txt_bloodgroup.Text = dt.Rows[0]["emp_bloodgroup"].ToString();
txt_address.Text = dt.Rows[0]["emp_address"].ToString();
txt_peraddress.Text = dt.Rows[0]["emp_permanentaddress"].ToString();
txt_mobile.Text = dt.Rows[0]["emp_mobile"].ToString();
txt_permobile.Text = dt.Rows[0]["emp_permanentmobile"].ToString();
txt_landline0.Text = dt.Rows[0]["emp_landline"].ToString();
txt_perlandline.Text = dt.Rows[0]["emp_permanentlandline"].ToString();
txt_email0.Text = dt.Rows[0]["emp_email"].ToString();
txt_emrgname.Text = dt.Rows[0]["emp_emergency_name"].ToString();
txt_emrgrelation.Text = dt.Rows[0]["emp_emergency_relation"].ToString();
txt_emrgmobile.Text = dt.Rows[0]["emp_emergency_mobile"].ToString();
txt_bankname.Text = dt.Rows[0]["emp_bankname"].ToString();
txt_bankbranch.Text = dt.Rows[0]["emp_bankbranch"].ToString();
txt_accountnum.Text = dt.Rows[0]["emp_bankaccount"].ToString();
seniorcode = dt.Rows[0]["emp_seniorcode"].ToString();
string drivingstatus = dt.Rows[0]["emp_driving_status"].ToString();
if (drivingstatus.Equals("Non"))
{
chkbl_driving.SelectedIndex = 0;
}
else if (drivingstatus.Equals("Two Wheeler"))
{
chkbl_driving.SelectedIndex = 1;
txt_dlno1.Text = dt.Rows[0]["emp_dlnumber"].ToString();
txt_dlvalidity1.Text = dt.Rows[0]["emp_dlvalidity"].ToString();
}
else if (drivingstatus.Equals("Four Wheeler"))
{
chkbl_driving.SelectedIndex = 2;
txt_dlno1.Text = dt.Rows[0]["emp_dlnumber"].ToString();
txt_dlvalidity1.Text = dt.Rows[0]["emp_dlvalidity"].ToString();
}
}
}
pallavi ajin
12-Oct-11 5:21am
View
its my aspx page at which there is one gridview in which edit button is exists...
<asp:GridView ID="gv_Employes" runat="server" AutoGenerateColumns="False"
DataKeyNames="emp_code">
<columns>
<%-- <asp:BoundField DataField="emp_id" HeaderText="emp_id" Visible="false"/>--%>
<asp:BoundField DataField="emp_code" HeaderText="Employee Code" />
<asp:BoundField DataField="emp_name" HeaderText="Employee Name" />
<asp:BoundField DataField="Br_name" HeaderText="Branch Name" />
<asp:BoundField DataField="dept_name" HeaderText="Department" />
<asp:BoundField DataField="designation_name" HeaderText="Designation" />
<asp:BoundField DataField="emp_gender" HeaderText="Gender" />
<asp:BoundField DataField="emp_mobile" HeaderText="Mobile" />
<asp:BoundField DataField="emp_email" HeaderText="Email-Id" />
<asp:BoundField DataField="emp_doj" HeaderText="Date of Joining" />
<asp:TemplateField>
<itemtemplate>
<asp:LinkButton ID="lbtnview" runat="server"
CommandArgument='<%# Bind("emp_code") %>'
oncommand="lbtnview_Command">View
<asp:TemplateField>
<itemtemplate>
<asp:LinkButton ID="lbtn_edit_emp" runat="server"
oncommand="lbtn_edit_emp_Command" CommandArgument='<%# Bind("emp_code") %>' >Edit
<asp:BoundField DataField="emp_id" Visible="False" />
<asp:TemplateField HeaderText="Deletion">
<itemtemplate>
<asp:LinkButton ID="lbtnsearchdel" runat="server"
oncommand="lbtnsearchdel_Command" CommandArgument='<%# Bind("emp_code") %>' CausesValidation="False"
OnClientClick="return confirm('Do you want to delete this record')" >Delete
pallavi ajin
12-Oct-11 5:19am
View
i still didn't cmplt it
pallavi ajin
12-Oct-11 3:44am
View
ok but i want to store it in textbox type variable sothat i can get the data of gridview in textbox for editing..help me
pallavi ajin
12-Oct-11 3:24am
View
can i use Textbox t instead of string str becoz i want to save it in textbox type
variable.
pallavi ajin
12-Oct-11 3:23am
View
can i use Textbox t instead of string str becoz i want to save it in textbox type
variable.
pallavi ajin
12-Oct-11 1:44am
View
public void bind_edugv()
{
int rowIndex = 0;
SqlDataAdapter adap = new SqlDataAdapter("select * from employee_education where emp_code='" + str + "'", con);
DataTable dt = new DataTable();
adap.Fill(dt);
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
TextBox box1 = (TextBox)gv_Edu.Rows[rowIndex].Cells[0].FindControl("txtCourse");
TextBox box2 = (TextBox)gv_Edu.Rows[rowIndex].Cells[1].FindControl("txtBoard");
TextBox box3 = (TextBox)gv_Edu.Rows[rowIndex].Cells[2].FindControl("txtFromDate");
TextBox box4 = (TextBox)gv_Edu.Rows[rowIndex].Cells[3].FindControl("txtToDate");
TextBox box5 = (TextBox)gv_Edu.Rows[rowIndex].Cells[4].FindControl("txtstream");
TextBox box6 = (TextBox)gv_Edu.Rows[rowIndex].Cells[5].FindControl("txtMarks");
box1.Text = dt.Rows[i]["emp_coursename"].ToString();
box2.Text = dt.Rows[i]["emp_board"].ToString();
box3.Text = dt.Rows[i]["emp_college_doj"].ToString();
box4.Text = dt.Rows[i]["emp_college_dol"].ToString();
box5.Text = dt.Rows[i]["emp_coursestream"].ToString();
box6.Text = dt.Rows[i]["emp_percentage"].ToString();
rowIndex++;
}
gv_Edu.DataSource = dt;
gv_Edu.DataBind();
}
}
i m binding by this
pallavi ajin
12-Oct-11 1:12am
View
i m doing at next page and as u u saying i m doing same as....but i dnt knw how to get data in gridview's textbox so that i can chang that
pallavi ajin
12-Oct-11 0:55am
View
after binding that i have to get that data back so that i can change data
pallavi ajin
12-Oct-11 0:54am
View
@Muralikrishna8811:-u mean i have to bind gridview again on the edit page.
pallavi ajin
12-Oct-11 0:42am
View
how can i get data in gridview's textboxes after clicking on the button of edit
pallavi ajin
12-Oct-11 0:39am
View
sir tel me plz
pallavi ajin
12-Oct-11 0:29am
View
actly i have 1 page at which all the information is shown in gridview and that gridview has 1 linkbutton that is for edit and after clicking on that the next page for editing will open and some information is shown according to id but in the data in gridview i dnt knw how to get that...so that i can edit in textboxes in gridview
pallavi ajin
10-Oct-11 7:55am
View
ok i m using this query for searching data in table....
so i dnt knw how to write it.
for ex
select * from tablename where empname like %'"+txt.text+"'%
in txt.Text data is entered by user thn he will click on search button after that result will be shown in the gridview
pallavi ajin
10-Oct-11 5:26am
View
u r rite i have done its doing work properly now....thnx a lot....
pallavi ajin
10-Oct-11 4:15am
View
sir its doing work properly but at run time its showing all...and after clicking on next button its showing page by page
pallavi ajin
10-Oct-11 3:54am
View
<asp:DataList ID="dl" runat="server" RepeatDirection="Horizontal"
DataKeyField="ID" RepeatColumns="5">
<HeaderTemplate>
</HeaderTemplate>
<itemtemplate>
<table>
<tr>
<td>
<asp:Image ID="Image2" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Recipe_Path")%>' Width="150px" Height="150px" />
</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="lbtnimage" runat="server"
CommandArgument='<%#Bind("ID") %>' Text='<%# Eval("Title_Recipes") %>'
onclick="lbtnimage_Click" oncommand="lbtnimage_Command">LinkButton
</td>
</tr>
</table>
<footertemplate>
its my datalist and its showing all recipes at a time....i want that it shouls show 10 at a time and whnvr i wl click on the next button it should show another 1...
pallavi ajin
10-Oct-11 3:50am
View
in datalist repeat columns are 5 and direction is horizontal.......
pallavi ajin
10-Oct-11 3:43am
View
ok sir i m doing this now its working and at lblCurrentPage.Text (label) its showing paging like 1 of 3 n so on but if m giving size like 5 its showing all at 1 page why so?on the click of button it should show next items....plz reply n thnx for previous 1....
pallavi ajin
10-Oct-11 3:29am
View
sir plz reply
pallavi ajin
10-Oct-11 3:21am
View
objDs.DataSource = ds.DefaultViewManager;
m i rite for this statement????
pallavi ajin
10-Oct-11 3:15am
View
ok i have done but its showing an exception i.e.
System.Web.HttpException: DataBinding: 'System.Data.DataViewManagerListItemTypeDescriptor' does not contain a property with the name 'ID'.
pallavi ajin
10-Oct-11 3:08am
View
see my code plz thn reply me sir
pallavi ajin
10-Oct-11 3:06am
View
binddatalist()is a method
public void bindDataList()
{
connection();
OleDbDataAdapter da = new OleDbDataAdapter("select * from addrecipes where Active='Active' order by ID desc", con);
DataSet ds = new DataSet();
da.Fill(ds, "addrecipes");
dl.DataSource = ds;
dl.DataBind();
}
pallavi ajin
10-Oct-11 3:04am
View
i have done this but its not working properly.....
pallavi ajin
10-Oct-11 3:04am
View
public int CurrentPage
{
get
{
object o = this.ViewState["_CurrentPage"];
if (o == null)
return 0;
else
return (int)o;
}
set
{
this.ViewState["_CurrentPage"] = value;
}
}
protected void items()
{
PagedDataSource objDs = new PagedDataSource();
OleDbDataAdapter da = new OleDbDataAdapter("select * from addrecipes where Active='Active' order by ID desc", con);
DataSet ds = new DataSet();
da.Fill(ds, "addrecipes");
objDs.DataSource = ds.DefaultViewManager ;
objDs.AllowPaging = true;
objDs.PageSize = 5;
objDs.CurrentPageIndex = CurrentPage;
lblCurrentPage.Text = "Page:" + (CurrentPage + 1).ToString() + " Of " + objDs.PageCount.ToString();
cmdprev.Enabled = !objDs.IsFirstPage;
cmdnext.Enabled = !objDs.IsLastPage;
dl.DataSource = objDs;
dl.DataBind();
}
protected void cmdprev_Click(object sender, EventArgs e)
{
try
{
CurrentPage -= 1;
items();
bindDataList();
}
catch (Exception ex)
{
}
}
protected void cmdnext_Click(object sender, EventArgs e)
{
try
{
CurrentPage += 1;
items();
bindDataList();
}
catch (Exception ex)
{
}
}
pallavi ajin
10-Oct-11 3:03am
View
i have seen but datalist is showing all records in table not according to the pagesize why so?
and at the prev button its not working and at the next its showing that all again and at label the paging is changing...
pallavi ajin
10-Oct-11 2:32am
View
reply plz
pallavi ajin
10-Oct-11 2:28am
View
i m not getting the line that is->DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty); becoz m not using this i m binding my datalist by coding
pallavi ajin
10-Oct-11 2:25am
View
objDs.CurrentPageIndex = CurrentPage;
what is this what is currentpage
pallavi ajin
8-Oct-11 3:05am
View
i m using but creating probs...but leave it i hv done it by anthr way...thnx
pallavi ajin
8-Oct-11 2:49am
View
but 1 more thing on that page its showing data.nw i want to insert that br_id,br_name into table along with others values.for the insertion of br_id i m using ddl.SelectedValue()and wht will i use for name ???may i use selectedItem()?and will i have to convert ddl.selectedvalue into integer????
pallavi ajin
8-Oct-11 2:49am
View
but 1 more thing on that page its showing data.nw i want to insert that br_id,br_name into table along with others values.for the insertion of br_id i m using ddl.SelectedValue()and wht will i use for name ???may i use selectedItem()?and will i have to convert ddl.selectedvalue into integer????
pallavi ajin
8-Oct-11 2:48am
View
but 1 more thing on that page its showing data.nw i want to insert that br_id,br_name into table along with others values.for the insertion of br_id i m using ddl.SelectedValue()and wht will i use for name ???may i use selectedItem()?and will i have to convert ddl.selectedvalue into integer????
pallavi ajin
8-Oct-11 2:45am
View
but 1 more thing on that page its showing data.nw i want to insert that br_id,br_name into table along with others values.for the insertion of br_id i m using ddl.SelectedValue()and wht will i use for name ???may i use selectedItem()?and will i have to convert ddl.selectedvalue into integer????
pallavi ajin
8-Oct-11 2:37am
View
but 1 more thing on that page its showing data.nw i want to insert that br_id,br_name into table along with others values.for the insertion of br_id i m using ddl.SelectedValue()and wht will i use for name ???may i use selectedItem()?and will i have to convert ddl.selectedvalue into integer????
pallavi ajin
8-Oct-11 2:33am
View
thnx
pallavi ajin
8-Oct-11 2:33am
View
thnx its working
pallavi ajin
7-Oct-11 1:43am
View
Deleted
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="users.aspx.cs" Inherits="Admin_users" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="updatepanel" runat="server">
<contenttemplate>
<table>
<tr>
<td colspan="2">
<asp:GridView ID="gvusers" runat="server" AutoGenerateColumns="False"
DataKeyNames="Uname" onrowdeleted="gvusers_RowDeleted"
onrowdeleting="gvusers_RowDeleting" onrowdatabound="gvusers_RowDataBound" PageSize="10" >
<columns>
<asp:ImageField DataImageUrlField="Path" HeaderText="Image">
<controlstyle height="100px" width="100px">
<itemstyle height="100px" width="100px">
<asp:BoundField DataField="Uname" HeaderText="Username" />
<asp:BoundField DataField="fname" HeaderText="Fname" />
<asp:BoundField DataField="lname" HeaderText="Lastname" />
<asp:BoundField DataField="dname" HeaderText="Display Name" />
<asp:BoundField DataField="emailid" HeaderText="EmailID" />
<asp:TemplateField HeaderText="Date & Time">
<edititemtemplate>
<asp:TextBox ID="TextBox1" runat="server">
<itemtemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("dateofreg") %>' >
<asp:TemplateField HeaderText="Mobile Number">
<edititemtemplate>
<asp:TextBox ID="TextBox2" runat="server">
<itemtemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("mobileno") %>'>'>
<asp:TemplateField HeaderText="Status">
<edititemtemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
<itemtemplate>
<asp:LinkButton ID="lbtnactivedeactive" runat="server"
Text='<%# Bind("Active") %>' CommandArgument='<%# Bind("uid") %>'
oncommand="lbtnactivedeactive_Command" OnClientClick="return confirm('are u sure')">
<asp:TemplateField HeaderText="Deletion" ShowHeader="False">
<itemtemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
CommandName="Delete" oncommand="LinkButton1_Command1" Text="Delete"
CommandArgument='<%# Bind("uid") %>'
OnClientClick="return confirm('Do you want to delete this record')"
>
</td>
</tr>
</table>
pallavi ajin
7-Oct-11 1:38am
View
Deleted
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="updatepanel" runat="server">
<table>
<tr>
<td colspan="2">
<asp:GridView ID="gvusers" runat="server" AutoGenerateColumns="False"
DataKeyNames="Uname" onrowdeleted="gvusers_RowDeleted"
onrowdeleting="gvusers_RowDeleting" onrowdatabound="gvusers_RowDataBound" PageSize="10" >
<asp:ImageField DataImageUrlField="Path" HeaderText="Image">
<asp:BoundField DataField="Uname" HeaderText="Username" />
<asp:BoundField DataField="fname" HeaderText="Fname" />
<asp:BoundField DataField="lname" HeaderText="Lastname" />
<asp:BoundField DataField="dname" HeaderText="Display Name" />
<asp:BoundField DataField="emailid" HeaderText="EmailID" />
<asp:TemplateField HeaderText="Date & Time">
<asp:TextBox ID="TextBox1" runat="server">
<asp:Label ID="Label1" runat="server" Text='<%# Bind("dateofreg") %>' >
<asp:TemplateField HeaderText="Mobile Number">
<asp:TextBox ID="TextBox2" runat="server">
<asp:Label ID="Label2" runat="server" Text='<%# Bind("mobileno") %>'>'>
<asp:TemplateField HeaderText="Status">
<asp:CheckBox ID="CheckBox1" runat="server" />
<asp:LinkButton ID="lbtnactivedeactive" runat="server"
Text='<%# Bind("Active") %>' CommandArgument='<%# Bind("uid") %>'
oncommand="lbtnactivedeactive_Command" OnClientClick="return confirm('are u sure')">
<asp:TemplateField HeaderText="Deletion" ShowHeader="False">
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
CommandName="Delete" oncommand="LinkButton1_Command1" Text="Delete"
CommandArgument='<%# Bind("uid") %>'
OnClientClick="return confirm('Do you want to delete this record')"
>
</td>
</tr>
</table>
i m using this but its not refreshing page on the click of link button.and i have done cmplt coding for this and its working
pallavi ajin
7-Oct-11 1:37am
View
I am using gridview to show data and I am also using LinkButton to delete and to activate/deactivate. But on the click of LinkButton, the changes are not reflected. When I refresh then those are showing. Inspite of using update panel, it is not working. What is the problem in it?plz help
pallavi ajin
7-Oct-11 1:31am
View
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="updatepanel" runat="server">
<contenttemplate>
<table>
<tr>
<td colspan="2">
<asp:GridView ID="gvusers" runat="server" AutoGenerateColumns="False"
DataKeyNames="Uname" onrowdeleted="gvusers_RowDeleted"
onrowdeleting="gvusers_RowDeleting" onrowdatabound="gvusers_RowDataBound" PageSize="10" >
<columns>
<asp:ImageField DataImageUrlField="Path" HeaderText="Image">
<controlstyle height="100px" width="100px">
<itemstyle height="100px" width="100px">
<asp:BoundField DataField="Uname" HeaderText="Username" />
<asp:BoundField DataField="fname" HeaderText="Fname" />
<asp:BoundField DataField="lname" HeaderText="Lastname" />
<asp:BoundField DataField="dname" HeaderText="Display Name" />
<asp:BoundField DataField="emailid" HeaderText="EmailID" />
<asp:TemplateField HeaderText="Date & Time">
<edititemtemplate>
<asp:TextBox ID="TextBox1" runat="server">
<itemtemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("dateofreg") %>' >
<asp:TemplateField HeaderText="Mobile Number">
<edititemtemplate>
<asp:TextBox ID="TextBox2" runat="server">
<itemtemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("mobileno") %>'>'>
<asp:TemplateField HeaderText="Status">
<edititemtemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
<itemtemplate>
<asp:LinkButton ID="lbtnactivedeactive" runat="server"
Text='<%# Bind("Active") %>' CommandArgument='<%# Bind("uid") %>'
oncommand="lbtnactivedeactive_Command" OnClientClick="return confirm('are u sure')">
<asp:TemplateField HeaderText="Deletion" ShowHeader="False">
<itemtemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
CommandName="Delete" oncommand="LinkButton1_Command1" Text="Delete"
CommandArgument='<%# Bind("uid") %>'
OnClientClick="return confirm('Do you want to delete this record')"
>
</td>
</tr>
</table>
i m using this but its not refreshing page on the click of link button.and i have done cmplt coding for this and its working
pallavi ajin
6-Oct-11 4:26am
View
i have done..............thnx for these links
pallavi ajin
6-Oct-11 2:31am
View
sry i want to use map
pallavi ajin
6-Oct-11 2:31am
View
sir i want 1 more thing that is i want to use maop in my application how can i integrate that to know the distance and direction from a particular location
pallavi ajin
6-Oct-11 2:24am
View
can't get idea about it plz give me details.....
pallavi ajin
6-Oct-11 2:16am
View
thnx now its working.........
pallavi ajin
6-Oct-11 2:11am
View
ok
pallavi ajin
6-Oct-11 2:11am
View
m i rite or not tell me sir
pallavi ajin
6-Oct-11 2:04am
View
<asp:DataList ID="dl" runat="server" RepeatDirection="Horizontal"
DataKeyField="ID" RepeatColumns="2">
<HeaderTemplate>
<table>
</HeaderTemplate>
<itemtemplate>
<tr>
<td>
<asp:ImageButton ID="ibtn" runat="server" Width="100px" Height="100px"
ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Recipe_Path")%>'
onclick="ibtn_Click" oncommand="ibtn_Command"/>
</td>
<td>
<asp:LinkButton ID="lbtnimage" runat="server"
CommandArgument='<%#Bind("ID") %>' Text='<%# Eval("Title_Recipes") %>'
onclick="lbtnimage_Click" oncommand="lbtnimage_Command">LinkButton
</td>
</tr>
<footertemplate>
</table>
pallavi ajin
5-Oct-11 7:01am
View
protected void btnrecipes_Click(object sender, EventArgs e)
{
gvjoke.Visible = false;
connection();
OleDbDataAdapter adap = new OleDbDataAdapter("select Title_Recipes,Description from addrecipes where uid=" + Session["idd"].ToString() + "", con);
DataTable dt = new DataTable();
adap.Fill(dt);
if (dt.Rows.Count > 0)
{
gvrecipies.DataSource = dt;
gvrecipies.DataBind();
gvrecipies.Visible = true;
btnrecipes.Visible = true;
btnjoke.Visible = true;
gvjoke.Visible = false;
}
else
{
gvrecipies.DataSource = null;
gvrecipies.DataBind();
Response.Write("<script language='javascript'>alert('No Records plz');</script>");
}
}
its working properly
pallavi ajin
5-Oct-11 6:58am
View
thank you so much..............code is doing work properly rly thnx sir.............
pallavi ajin
5-Oct-11 6:54am
View
protected void btnrecipes_Click(object sender, EventArgs e)
{
gvjoke.Visible = false;
connection();
OleDbDataAdapter adap = new OleDbDataAdapter("select Title_Recipes,Description from addrecipes where uid=" + Session["idd"].ToString() + "", con);
DataTable dt = new DataTable();
adap.Fill(dt,"addrecipes");
if (dt.Rows.Count > 0)
{
gvrecipies.DataSource = dt;
gvrecipies.DataBind();
gvrecipies.Visible = true;
btnrecipes.Visible = true;
btnjoke.Visible = true;
gvjoke.Visible = false;
}
else
{
gvrecipies.DataSource = null;
gvrecipies.DataBind();
//ScriptManager.RegisterStartupScript(this, this.GetType(), "Key", "alert('no value')", true);
Response.Write("<script language='javascript'>alert('No Records plz');</script>");
}
pallavi ajin
5-Oct-11 6:52am
View
okkkkk sry i m tryng agn
pallavi ajin
5-Oct-11 6:50am
View
i want 1 thing that there is 1 user when he will login then a profile page will open in front of him than can see all the records in the gridview for examples whenever he wl click on "recipe button thn he wl see all the recipes which are saved by him"..........i wany that if he don't have any records in database thn a msg shld be shown that u dnt have any record .......help me
pallavi ajin
5-Oct-11 6:46am
View
its still not working.....read carefully my prob plz sir
pallavi ajin
5-Oct-11 6:42am
View
ok but its also working in another code.......but the condition is alwz going to false................. (dt.rows.count>0)is not working its null in every case
pallavi ajin
5-Oct-11 6:39am
View
sir where is ur updated code?????????????
pallavi ajin
5-Oct-11 6:33am
View
protected void btnrecipes_Click(object sender, EventArgs e)
{
connection();
OleDbCommand cmd = new OleDbCommand("select Title_Recipes,Description from addrecipes where uid=" + Session["idd"].ToString() + "", con);
DataTable dt = new DataTable();
if (dt.Rows.Count > 0)
{
gvrecipies.DataSource = dt;
gvrecipies.DataBind();
}
else
{
gvrecipies.DataSource = null;
gvrecipies.DataBind();
ScriptManager.RegisterStartupScript(this, this.GetType(), "Key", "alert('no value')", true);
}
}
i m doing this but its not working help me
pallavi ajin
5-Oct-11 6:28am
View
if user has value in case of that its printing the msg that dnt have recors??????????i want to do this on the click event of button
pallavi ajin
5-Oct-11 5:55am
View
i want 1 thing that there is 1 user when he will login then a profile page will open in front of him than can see all the records in the gridview for examples whenever he wl click on "recipe button thn he wl see all the recipes which are saved by him"..........i wany that if he don't have any records in database thn a msg shld be shown that u dnt have any record .......help me
pallavi ajin
5-Oct-11 5:03am
View
i have done that code.....but i used checkbox.......
pallavi ajin
4-Oct-11 8:15am
View
I M DOING THIS ON THE CLICK EVENT OF BUTTON
foreach (GridViewRow row in GridView1.Rows)
{
RadioButton rbtn = (RadioButton)row.FindControl("RadioButton1");
HiddenField hdfID = (HiddenField)row.FindControl("HiddenField1");
if (rbtn != null && rbtn.Checked)
{
strSQL = "update addrecipes SET [IsActive]=1 where ID=" + hdfID.Value + "";
du.ExecuteDML(strSQL);
}
}
pallavi ajin
4-Oct-11 8:13am
View
ya i m doing this but can u provide me coding for that i mean step by step.....plz
pallavi ajin
4-Oct-11 7:56am
View
ok i wl use radiobutton in gridview but i want one more thing that i want to save yes or no in database on the click of button.means i have 1 gridview in that i have radio button and at run time i want to save yes or no value in database after clicking on radiobutton.and after that submit button.means after selecting 1 radiobutton when user will click on the button it should be save in database with yes or no valiue....plz help me
Show More