|
right click on the name of your project in solution explorer, then click on 'add new item', then select 'Class' and press Add button.
|
|
|
|
|
how to write a class file.pls send me a sample class file.
|
|
|
|
|
Dear All,
I got a problem with the following case: I would like to enable a button after the file export (using asp.net), the code is:
Dim fi As System.IO.FileInfo = New System.IO.FileInfo(strPath)
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;filename=" + fi.Name)
Response.AddHeader("Content-Length", fi.Length.ToString())
Response.ContentType = "Text Documents (*.txt)"
Response.WriteFile(fi.FullName)
Response.Flush()
btnXXX.enable=true
But the button cannot be enabled, i have no idea why it happened.
I got no idea about what happened...
Thank for your kind help!
|
|
|
|
|
What you set the button enable value on on page load ?
After post back he don't what you set the button enable value. so you need to check on page load.
because HTTP is a state less.
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Thanks for your reply!
In page load, i have set the button .Enabled = True
but whatever i type, e.g. msgbox ("Hello")
also no response...
|
|
|
|
|
I'm not sure you can have anything after the Response.Flush(). I think you might have further problems as it is going to treat this page like a .txt file, not an aspx page.
|
|
|
|
|
Thanks for your reply!
Response.Flush() <-- it will show the save as dialog and let user to save the file
it works correctly, but the button cannot change to enable = true
|
|
|
|
|
iam having a text box if user enters a date it should be checked if the date is in dd/mm/yyyy formate other wise it should promt the user the enter date is wron
|
|
|
|
|
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...
|
|
|
|