Click here to Skip to main content
15,889,519 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Juavascript Close window Pin
avi_dadi200223-Sep-08 22:36
avi_dadi200223-Sep-08 22:36 
AnswerRe: Juavascript Close window Pin
vimal_yet23-Sep-08 21:07
vimal_yet23-Sep-08 21:07 
AnswerRe: Juavascript Close window Pin
Abhishek Sur23-Sep-08 22:30
professionalAbhishek Sur23-Sep-08 22:30 
AnswerRe: Juavascript Close window Pin
avi_dadi200223-Sep-08 23:07
avi_dadi200223-Sep-08 23:07 
QuestionCustom control development - Security issues Pin
Palli Rummi23-Sep-08 19:49
Palli Rummi23-Sep-08 19:49 
AnswerRe: Custom control development - Security issues Pin
Abhishek Sur23-Sep-08 22:40
professionalAbhishek Sur23-Sep-08 22:40 
Questionhow to validate the grid when a checkbox and textbox is present Pin
lakshmichawala23-Sep-08 19:22
lakshmichawala23-Sep-08 19:22 
AnswerRe: how to validate the grid when a checkbox and textbox is present Pin
avi_dadi200223-Sep-08 21:04
avi_dadi200223-Sep-08 21:04 
Load the grid with values in page load with isnot postback

Like
if (!IsPostBack)
{
SqlConnection cn = new SqlConnection("Data Source=<xxxxx>; Initial Catalog=<dbname>;user ID=sa");
SqlCommand cmd = new SqlCommand("Select top 5 [Group] from customerlist WHERE [Group] is not null", cn);
SqlDataAdapter da = new SqlDataAdapter(cmd);

DataSet ds = new DataSet();
da.Fill(ds);

GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}

after that in button click event add this code

bool status = false;

for (int i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox chk = (CheckBox)GridView1.Rows[i].Cells[1].FindControl("chk");
TextBox txt = (TextBox)GridView1.Rows[i].Cells[2].FindControl("txt");

if (chk.Checked == true)
if (txt.Text.Trim() == "")
{
status = true;
//return;
}
}
if (status == true)
{
Response.Write("TextValue Sholdn't be blank");
}
else
{
Response.Write("Success");
}

Send me if u've any doubt.It will work
AnswerRe: how to validate the grid when a checkbox and textbox is present Pin
vimal_yet23-Sep-08 21:05
vimal_yet23-Sep-08 21:05 
Questionremove single quote from a string Pin
Member 387988123-Sep-08 19:06
Member 387988123-Sep-08 19:06 
AnswerRe: remove single quote from a string Pin
lakshmichawala23-Sep-08 19:34
lakshmichawala23-Sep-08 19:34 
AnswerRe: remove single quote from a string Pin
Baran M23-Sep-08 23:08
Baran M23-Sep-08 23:08 
AnswerRe: remove single quote from a string Pin
K V Sekhar24-Sep-08 2:50
K V Sekhar24-Sep-08 2:50 
AnswerRe: remove single quote from a string Pin
WebMaster2-Feb-10 22:11
WebMaster2-Feb-10 22:11 
QuestionRepeater Footer Template Pin
meghamaharshi23-Sep-08 18:59
meghamaharshi23-Sep-08 18:59 
QuestionWeb Parts... Pin
Illegal Operation23-Sep-08 18:55
Illegal Operation23-Sep-08 18:55 
QuestionEnter key and button behavior Pin
aecordoba23-Sep-08 10:51
aecordoba23-Sep-08 10:51 
AnswerRe: Enter key and button behavior Pin
Blue_Boy23-Sep-08 12:12
Blue_Boy23-Sep-08 12:12 
AnswerRe: Enter key and button behavior Pin
Steve Echols23-Sep-08 17:23
Steve Echols23-Sep-08 17:23 
GeneralRe: Enter key and button behavior Pin
Baran M23-Sep-08 18:41
Baran M23-Sep-08 18:41 
GeneralRe: Enter key and button behavior Pin
Steve Echols23-Sep-08 18:47
Steve Echols23-Sep-08 18:47 
GeneralRe: Enter key and button behavior Pin
aecordoba24-Sep-08 3:57
aecordoba24-Sep-08 3:57 
QuestionNested UserControls nested in UpdatePanels Pin
vartana81823-Sep-08 10:01
vartana81823-Sep-08 10:01 
QuestionFrom where I can Start to Learn .Net 3.0? Pin
Yuwraj23-Sep-08 9:59
Yuwraj23-Sep-08 9:59 
AnswerRe: From where I can Start to Learn .Net 3.0? Pin
NeverHeardOfMe23-Sep-08 10:38
NeverHeardOfMe23-Sep-08 10:38 

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.