|
better you can use some calender controls instead of allowing users to enter date.
|
|
|
|
|
SCRIPT LANGUAGE="JavaScript">
<!--
function y2k(number)
{
return (number < 1000) ? number + 1900 : number;
}
var reason = '';
function isValidDate (myDate,sep) {
// checks if date passed is in valid dd/mm/yyyy format
if (myDate.length == 10) {
if (myDate.substring(2,3) == sep && myDate.substring(5,6) == sep) {
var date = myDate.substring(0,2);
var month = myDate.substring(3,5);
var year = myDate.substring(6,10);
var test = new Date(year,month-1,date);
if (year == y2k(test.getYear()) && (month-1 == test.getMonth()) && (date == test.getDate())) {
reason = '';
return true;
}
else {
reason = 'valid format but an invalid date';
return false;
}
}
else {
reason = 'invalid spearators';
return false;
}
}
else {
reason = 'invalid length';
return false;
}
}
function tellMeIfInvalid(myDate) {
if (isValidDate(myDate,'/'))
document.write(myDate + ' = valid date<BR>');
else
document.write(myDate + ' = ' + reason + '<BR>');
}
tellMeIfInvalid('21/02/1999');
tellMeIfInvalid('2190291999');
tellMeIfInvalid('2/02/1999');
tellMeIfInvalid('21/2/1999');
tellMeIfInvalid('21/02/199');
tellMeIfInvalid('32/02/1999');
tellMeIfInvalid('21/02/1999');
//--></SCRIPT>
Jithu
software developer
|
|
|
|
|
I need the next: to load image gif (transparent) and to draw over the top one other image . Here a code
Bitmap img = (Bitmap) System.Drawing.Bitmap.FromFile(badgepath + "100pct_blue.gif");
System.Drawing.Bitmap dic = (Bitmap)System.Drawing.Bitmap.FromFile(Dicitalpath +
+ "dic.bmp");
Bitmap tmp = new Bitmap(img.Width, img.Height);
int w = img.Height / 2 - dic.Width / 2;
int h = img.Width - dic.Height;
Graphics g = Graphics.FromImage(tmp);
g.DrawImage(img, new Rectangle(0, 0, img.Width, img.Height), 0, 0,
img.Width, img.Height, GraphicsUnit.Pixel);
g.DrawImage(dic, new Point(w, h));
//img.Save(Response.OutputStream, ImageFormat.Gif); //if use this, i see only first image gif
//tmp.Save(Response.OutputStream, ImageFormat.Gif); // if use this i see both image but on a black background, and it is necessary that were transparent. If who that knows,help please
|
|
|
|
|
|
hey i have implemented the videostreaming in asp.net using jw flvplayer but my problem is the clearity, i want just as in youtube player? can somebody give suggestion how to improve quality only using flv player which should be open source,that means i want the clearity which youtube provides
modified on Monday, December 17, 2007 7:24:03 AM
|
|
|
|
|
How to remove a node in an xml file.If the xml file is like
<?xml version="1.0" encoding="ISO-8859-1"?>
<countries>
<country>
<text>India</text>
<value>I</value>
</country>
<country>
<value>A</value>
</country>
<country>
<value>F</value>
</country>
</countries>
I want to remove the node country.How is it possible..
|
|
|
|
|
As per my perception, this is possible with Dataset.
Load the XML into Dataaset and manipulate it whatever you want. This is the easy way.
/***********************/
* Parwej Ahamad *
* g.parwez@gmail.com *
/***********************/
|
|
|
|
|
XmlDocument countries = new XmlDocument();<br />
countries.LoadXml(@"<countries><br />
<country><br />
<text>India</text><br />
<value>I</value><br />
</country><br />
<country><br />
<value>A</value><br />
</country><br />
<country><br />
<value>F</value><br />
</country><br />
</countries>");<br />
Console.WriteLine(countries.OuterXml);<br />
XmlNode oldChild = countries.SelectSingleNode("countries/country[text='India']");<br />
if (oldChild != null)<br />
oldChild.ParentNode.RemoveChild(oldChild);<br />
Console.WriteLine(countries.OuterXml);
Jim
|
|
|
|
|
Hello Friends,
I've taken a DataList and in this datalist i've displayed images from my database.
But now i want to display a big image onmouseover accordingly the image.
For example: as i onmouseover my first image then a new big image of first image should be displayed and if i onmouseover my second image then it should display a big one of second image
something like this
http://www.asp.net/ajax/showcase/default.aspx[^]
modified on Monday, December 17, 2007 4:07:52 AM
|
|
|
|
|
hi all
am using asp.net 2.0 with ajax...if am trying to debug any page by putting a break point and in between if i stopped for a while den the following error is coming....den after tht again i nne d to close and run it again
Error:
sys.WebForms.PageRequestManagerTimeoutException:The server request timed out.
?
|
|
|
|
|
Try setting AsyncPostBackTimeOut property of scriptmanager to a large time. Do you have a long running process ? I guess it is waiting for completion and getting timeout.
|
|
|
|
|
i think u r using ScriptManager. then it is not error. u r taking lots of time to debug ur program then its fire. u increase ur AsyncPostBackTimeout time in property of ScriptManager.
Piyush Vardhan Singh
|
|
|
|
|
Hi,
I have a doubt what exactly happend a webreference is added to a webapplication...please give me a detailed answer...
regards
alex..
|
|
|
|
|
How Can I handle Oracle ref cursors using enterprise libraries??
|
|
|
|
|
hi all...
i have put a div tag inside table......
the code is like this
<td style="width: 14%;height:100%" >
<table style="height:100%;width:100%;">
<tr>
<td valign="top" style="background-color:#C7B39A;height:525px;width:214px;" >
<div style="POSITION: absolute; HEIGHT: 530px;width:100%; z-index: 100;background-color:#E6DDD2; left: 0px; top: 0px;overflow:auto">
<uc2:uc_NavigationTree_Reports ID="Uc_NavigationTree_Reports1" runat="server" />
</div>
</td>
</tr>
</table>
</td>
here first TD width is 14%...the table inside the TD is 100%..so it wl take the 100% of that 14%....correct?...so in the div also i have given 100%....so it should take the 100% of tha table....
this was working fine before,that time i was using IE6...now i am using IE7....now the div is taking the full spacelike it is coiming full scraan....why is it happening like that?
|
|
|
|
|
Hi Sandhya,
Is it neccesary to take the "z-index " in the div? Try to remove it from div and try again. I am not sure for this, but you can try it.
Regards,
Keep Smiling
|
|
|
|
|
no that is not working...i have tried after removing also....result is the same...
|
|
|
|
|
my dear give ur div POSITION:relative
Piyush Vardhan Singh
|
|
|
|
|
ya it is working...thanku....
|
|
|
|
|
IE7 and Mozilla is very sensitive so always keep this thing in mind.it is not necessary which ht ml run proper on ie6 that also run an ie7 and Mozilla and which 14 u calibrates u birth day
Piyush Vardhan Singh
|
|
|
|
|
HI,
U have take UC: User Control in ur div.
So it this control have some witdh it it?If it is exceding to ur TD Width : then It may cause Problem.
U can remove z-index from ur code.
And last : DOn't give hight width without percentage[%]
Always Give H/W in percentage only.
why have u take width of a TD in Pixcels U can try by giving it in percentage.
Just Do IT™ [Information Technology]™ :->
|
|
|
|
|
what we use regular expression for this \ symbol
Piyush Vardhan Singh
|
|
|
|
|
You mean to say How to check "\" in regular expression.
/***********************/
* Parwej Ahamad *
* g.parwez@gmail.com *
/***********************/
modified on Monday, December 17, 2007 1:39:59 AM
|
|
|
|
|
|
hi
i'm using a banner management system in my project. in that while we click on the banner it will go to a new page(Track.aspx) with some informations like navigate url and the datas that i need to insert into database for tracking.
i want to open the url specified on the startup of Track.aspx. is it possible to open new window in this case. please help me...
|
|
|
|