|
Civic06 wrote: but if users don't have it checked can we programmatically control it?
You don't have any control on client browser. May be you can do it using some ActiveX injection. But, This will work only on IE.
|
|
|
|
|
I am not sure if it does so but might be using
@media print{
background-color:red;
}
Check
http://www.w3.org/TR/CSS2/media.html[^]
for further reference.
modified on Friday, August 14, 2009 5:21 PM
|
|
|
|
|
Hi all,
Im using JS to check the date and month validation. If i give 08-14-1949
the month value return as 0 not as 8 and the same problem for 09-14-1983.
These two month value is considered as 0. I cant resolve it. Please help me.
Code.
function checkyear(source, arg) {
var txtDOB = arg.Value;
var birthdate = txtDOB.split("/");
var yearvalue = parseInt(birthdate[2]);
var MonthValue = parseInt(birthdate[0]);
var DayValue = parseInt(birthdate[1]);
var date = new Date();
alert(yearvalue);
alert(MonthValue);
alert(DayValue);
var CurrentYear = date.getFullYear();
if (MonthValue < 1 || MonthValue > 12) {
alert(MonthValue);
source.errormessage = "Please enter a valid Date of birth";
arg.IsValid = false;
return;
}
if (DayValue < 1 || DayValue > 31 || (MonthValue == 2 && DayValue > daysInFebruary(yearvalue))) {
alert(DayValue);
source.errormessage = "Please enter a valid Date of birth";
arg.IsValid = false;
return;
}
if (yearvalue >= CurrentYear - 13) {
source.errormessage = "Your age should be greater than 13.";
arg.IsValid = false;
return;
}
else if ((yearvalue <= 1900) || (yearvalue >= CurrentYear)) {
source.errormessage = "Please enter a valid Date of birth";
arg.IsValid = false;
return;
}
else {
arg.IsValid = true;
}
}
function daysInFebruary(year) {
return (((year % 4 == 0) && ((!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28);
alert(((year % 4 == 0) && ((!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28);
}
|
|
|
|
|
Why do you require all this code??
Why dont you use
var myDate=new Date();
myDate.setFullYear(2000,0,23);
Now you can use
myDate.getMonth();
myDate.getDay();
etc.. and make your life easy.
On your case the Culprit is parseInt . It has a bug, if you parseInt(08) it returns 0 rather than 8.
The easy fix would be
parseInt(08 * 1) . This will fix your issue.
cheers..
|
|
|
|
|
Hi. Can i use SqlBulkCopy for Oracle Database.
|
|
|
|
|
srikantha_nagaraj wrote: Hi. Can i use SqlBulkCopy for Oracle Database
How does it related to ASP.NET ?
|
|
|
|
|
Actually i have code for upload excel into sql database using asp.net, there i have used sqlbulk copy. Now i have to change the code to upload excel into oracle database. Can i use SqlBulkCopy there?
|
|
|
|
|
|
How to provide GridView records selection with its select commandfield without postback.
Also there is Column in a GridView as a hyperlink, how can we use javascript to click on the link and open it in a new window?
Чесноков
|
|
|
|
|
Do it on Gridview
RowDataBound<br />
lbl.Attributes.Add("onclick", "javascript:window.location.href='" + url + "'");
|
|
|
|
|
Hello!
I want to move the items which have been checked from one grid to another grid. that is i have added template field of check box in my data bound grid.(sql datasource bounded) upon checking the rows and clicking a button the selected rows are moved in another grid and deleted from prev one.
want some suggestions for it.
thanks f@ri
|
|
|
|
|
Simple.
On click event of button first, find the selected row of datargid add this to another DataSet or DataTable which you have bounded with another grid.
And then remove this row from your first DataTable or DataSet using
.Remove methond.
For more clarification please provide code...
Be an Eagle, Sky is Yours.
|
|
|
|
|
Does anyone use Mono[^]?
I've been thinking about trying it out for some of my websites.
modified on Friday, August 14, 2009 7:49 AM
|
|
|
|
|
is that a question???????
|
|
|
|
|
the question was in the subject line, does anyone use
Mono[^]
|
|
|
|
|
Is it the right place to question this.
This is ASP.NET.
|
|
|
|
|
I believe so but if you can think of a better place please let me know.
Mono is the Linux version of asp.net, the code is the same that is why I asked here.
I'm looking for input from people like me, people that primarily windows developers.
|
|
|
|
|
Mono is actually not related with ASP.NET. It can build any type of supported applications.
You can use MONO in MAC as well.
I think a better place should be "General IT Issues", where you can discuss about Mono.
|
|
|
|
|
Hi. I have table in the database. I want to show the table row as column in the gridview. How can i do that?
|
|
|
|
|
|
I think you need to do it in database..
Use TSQL PIVOT function to convert row into columns and vice-versa.
Check this
http://msdn.microsoft.com/en-us/library/ms177410.aspx
for more help.
|
|
|
|
|
|
How to bind data to a gridview located in the footer row?
|
|
|
|
|
protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[0].Text = //your bind data
}
}
|
|
|
|
|
protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
DropDownList objDDL=new DropDownList();
objDDL.TextField="DisplayFieldName";
objDDL.ValueField="ValueFieldName";
objDDL.datasource="yourdatasoruce" ;
objDDL.DataBind();
e.Row.Cells[0].Controls.Add(objDDL);
}
}
Hope this helps!
|
|
|
|