Click here to Skip to main content
15,921,577 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: blank forms submitting on server, all validations not working. Pin
Zafar A khan 21-Jul-09 1:52
professionalZafar A khan 21-Jul-09 1:52 
GeneralRe: blank forms submitting on server, all validations not working. Pin
er.puneet21-Jul-09 18:44
er.puneet21-Jul-09 18:44 
GeneralRe: blank forms submitting on server, all validations not working. Pin
Zafar A khan 21-Jul-09 20:34
professionalZafar A khan 21-Jul-09 20:34 
GeneralRe: blank forms submitting on server, all validations not working. Pin
er.puneet22-Jul-09 0:50
er.puneet22-Jul-09 0:50 
GeneralRe: blank forms submitting on server, all validations not working. Pin
Zafar A khan 22-Jul-09 17:41
professionalZafar A khan 22-Jul-09 17:41 
GeneralRe: blank forms submitting on server, all validations not working. Pin
er.puneet9-Aug-09 21:01
er.puneet9-Aug-09 21:01 
GeneralRe: blank forms submitting on server, all validations not working. Pin
Zafar A khan 9-Aug-09 22:34
professionalZafar A khan 9-Aug-09 22:34 
Questionmaintain checkbox selection for paging in gridview [modified] Pin
vikas shukla17-Jul-09 19:14
vikas shukla17-Jul-09 19:14 
hi sir
please help me
actually sir i want little support from your side
the problem is that
i want to maintain the checkbox selection state for paging.
i mean to say that if i select two checkbox on gridview and then i go to next page and there i again select one checkbox then i return on first page then what ever the checkbox i have selected from first page should be checked.i am using following.
protected void pageindex_changing(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
RememberOldValues(GridView1, "chk2");

refresh();
}
private void RememberOldValues(GridView gridview, string checkboxname)
{
ArrayList categoryIDList = new ArrayList();
int index = -1;
foreach (GridViewRow row in gridview.Rows)
{
index =Convert.ToInt32 (gridview.DataKeys[row.RowIndex].Value);
bool result = ((CheckBox)row.FindControl("chk2")).Checked;

// Check in the Session
if (Session["CHECKED_ITEMS"] != null)
categoryIDList = (ArrayList)Session["CHECKED_ITEMS"];
if (result)
{
if (!categoryIDList.Contains(index))
categoryIDList.Add(index);
}
else
categoryIDList.Remove(index);
}
if (categoryIDList != null && categoryIDList.Count > 0)
Session["CHECKED_ITEMS"] = categoryIDList;
WebMsgBox.Show(Session["CHECKED_ITEMS"].ToString());
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
RePopulateValues(GridView1 , "chk2");
}
private void RePopulateValues(GridView gridview, string checkboxname)
{
ArrayList categoryIDList = (ArrayList)Session["CHECKED_ITEMS"];
if (categoryIDList != null && categoryIDList.Count > 0)
{
foreach (GridViewRow row in gridview.Rows)
{
int index = Convert.ToInt32 (gridview.DataKeys[row.RowIndex].Value);
if (categoryIDList.Contains(index))
{
CheckBox checkbox = (CheckBox)row.FindControl("chk2");
checkbox.Checked = true;

// row.BackColor = Color.FromName("#FFAA63");
}
}
}
}
chk2 is checkbox column id.
thanks



hi brij sir
there was an error Page Not Found
please give anything else




hi abhijit sir
yes i think i am facing problem to open this url.
please send me the url .



modified on Saturday, July 18, 2009 3:39 AM

AnswerRe: maintain checkbox selection for paging in gridview Pin
Brij17-Jul-09 20:48
mentorBrij17-Jul-09 20:48 
AnswerRe: maintain checkbox selection for paging in gridview Pin
Abhijit Jana17-Jul-09 21:27
professionalAbhijit Jana17-Jul-09 21:27 
AnswerRe: maintain checkbox selection for paging in gridview Pin
Abhijit Jana17-Jul-09 21:57
professionalAbhijit Jana17-Jul-09 21:57 
GeneralRe: maintain checkbox selection for paging in gridview Pin
vikas shukla17-Jul-09 22:28
vikas shukla17-Jul-09 22:28 
GeneralRe: maintain checkbox selection for paging in gridview Pin
Abhijit Jana17-Jul-09 22:34
professionalAbhijit Jana17-Jul-09 22:34 
AnswerRe: maintain checkbox selection for paging in gridview Pin
Brij18-Jul-09 1:14
mentorBrij18-Jul-09 1:14 
QuestionUser Control Inside Modal Popup Pin
anada888617-Jul-09 16:38
anada888617-Jul-09 16:38 
AnswerRe: User Control Inside Modal Popup Pin
Abhijit Jana19-Jul-09 7:47
professionalAbhijit Jana19-Jul-09 7:47 
GeneralRe: User Control Inside Modal Popup Pin
anada888619-Jul-09 16:32
anada888619-Jul-09 16:32 
Questionpopup is blocking my download Pin
cmrhema17-Jul-09 16:03
cmrhema17-Jul-09 16:03 
AnswerRe: popup is blocking my download Pin
Christian Graus17-Jul-09 16:16
protectorChristian Graus17-Jul-09 16:16 
QuestionCan not find Code Behind code; getting "Could not create type " Pin
Lori Janes17-Jul-09 6:41
Lori Janes17-Jul-09 6:41 
AnswerRe: Can not find Code Behind code; getting "Could not create type " Pin
Abhijit Jana17-Jul-09 6:55
professionalAbhijit Jana17-Jul-09 6:55 
GeneralRe: Can not find Code Behind code; getting "Could not create type " [modified] Pin
Lori Janes17-Jul-09 7:58
Lori Janes17-Jul-09 7:58 
GeneralRe: Can not find Code Behind code; getting "Could not create type " Pin
Abhijit Jana17-Jul-09 22:04
professionalAbhijit Jana17-Jul-09 22:04 
QuestionDictionary object in .Net Pin
Tina P17-Jul-09 6:37
Tina P17-Jul-09 6:37 
AnswerRe: Dictionary object in .Net Pin
Christian Graus17-Jul-09 9:23
protectorChristian Graus17-Jul-09 9:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.