|
yes .. Javascript always have this problem. I think you can use serverside controls to solve this security problems.
Use ICallbackEventHandler to handle callbacks on every event of your html calendar.
actually callbacks works with javascript also. And easier to handle too.
Abhishek Sur
|
|
|
|
|
iam having a grid where there is one checkbox and one text box in each row now how can i
validate using javascript
if the check box is checked then textbox of that particular row of the grid should not be left blank .this should happen when submit button is clicked.
|
|
|
|
|
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
|
|
|
|
|
|
Hi guys i have a string,
it contains a single quote,
i want to remove it,
how to do that?,
This is my string: reddy's
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
try this one
if str.indexof("'")>0 then
str.str.replace("'","")
end if
|
|
|
|
|
Regex.Replace(str, @"[^\w]", "");
is a method available in System.Text.RegularExpressions namespace.
|
|
|
|
|
try this
str.str.Replace("'","");
|
|
|
|
|
|
Hi..
I have a label in footer template in repeater control i want to access this label on submit button's click event in .cs page...
|
|
|
|
|
How can I set the "Title" of a webpart = Page.Title.ToString()?
Currently I have a Label in the ZoneTemplate and everything works but I need the title to change to the page title dynamically.
Thanks!!
Illegal Operation
|
|
|
|
|
Hi there!
I have a WebForm (ASP.NET 2.0) with a textbox and two buttons, one of them (sendButton) to send the textbox's content, and the other one (cancelButton) to cancel the operation.
I need when the user write something in the textbox and then press 'Enter' key, the textbox's content will be sent to the server. (The same thing like if he push the sendButton.)
I have some WebForms with that behavior: 'Enter' key has the same effect like a button, but I don't see difference.
Can somebody help me?
Thank you in advance.
[Adrián Córdoba]
|
|
|
|
|
<asp:textbox id="txtControl" runat="server" onkeydown="if(event.keyCode==13) ButtonName.click(); " xmlns:asp="#unknown"></asp:textbox>
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I think you can also use:
<form id="form1" runat="server" defaultbutton="sendButton">
If you're using master pages, you have to set the default button for each page manually like this (in you Page Load handler):
HtmlForm frm = (HtmlForm)Master.FindControl("form1");
frm.DefaultButton = sendButton.UniqueID;
Worth a shot anyway.
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
|
Maybe post on main thread....
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
Steve Echols wrote: If you're using master pages, you have to set the default button for each page manually like this (in you Page Load handler):
HtmlForm frm = (HtmlForm)Master.FindControl("form1");
frm.DefaultButton = sendButton.UniqueID;
Thank you, 'S'. You are right.
[Adrián Córdoba]
|
|
|
|
|
Here is what i have
< UpdatePanel >
<dynamically added="" user="" control="">
< UpdatePanel >
all updatepanels are set to conditional
For some reason when i click the button the button click event does not fire. Thank you ahead of time for your healp.
|
|
|
|
|
From where I can Start to Learn .Net 3.0?
|
|
|
|
|
English tourist to local Irishman: Excuse me my good man, how do I get to Dublin from here?
Irishman to English tourist: Oh, if I was you, I wouldn't start from here!
|
|
|
|
|
Hi
I just installed VS2008, im having problems with the design and source view
I opened a web project i had developed in VS2005
When trying to modify the text on the page and then changed to source view, i noticed that the text had been changed (a part was lost and oter part was moved), also something weird happen to an html image that i had inside a hyperlink control
This page is using a masterpage, i also noticed how the layout f the masterpage was changing, this is really weird since one cant change the layout of the masterpage from the contentpage (in design)
Has anyone else have any problems or weird behavior??
My version is: 9.0.21022.8 RTM
Trial version
Thanks in advance for any comments
Alexei Rodriguez
|
|
|
|
|
hi
i am using asp.net and on linkbutton click i call a javascript to open abc.aspx page in new window and in this form i add data from mydatabase and then i say response.redirect after adding record in database but page is open in new page.
while i want to show only one message after add data in database datasuccessfully added and after that window will closed?
please solve my problem
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
Page.RegisterStartupScript("myrest", "alert('Hello');");
use this after record insertion.
your's subbu
|
|
|
|
|
include the below code in ur head tag
<base target="_self" />
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
While Reading 1005 records from Excel2000 through asp.net,c# application. inside the application two sp are called for 1005 times.
I get the following errors "SQL Server does not exist or access denied ,ConnectionOpen (Connect()).".
While reading 850 records from excel 2000 it's working fine and two sp are called 850 times.
Thanks in Advance
Senthilkumar.T
|
|
|
|