|
hi! try this
first onclick of [+,-,*,/]button store the value of textbox into hidden fields and clear the value of that...
N1.Value = TextBox1.Text; // N1 is a hidden field
Sign.Value = "+"; // Sign is hidden field
TextBox1.Text = "";
and on click of [=] button use the following code
double N2 = Convert.ToDouble(TextBox1.Text);
if(Sign=="+")
TextBox1.Text = N2 + Convert.ToDouble(N1.Value);
if(Sign=="-")
TextBox1.Text = Convert.ToDouble(N1.Value) - N2;
if(Sign =="*")
TextBox1.Text = Convert.ToDouble(N1.Value) * N2;
i thinks this will help you!
|
|
|
|
|
Thank you......
|
|
|
|
|
In one of my application I am fetching data from a table sql server and send it to a table in oracle.The table has huge data.It is taking time but it is working.When I use AJAX and UPDATEPROGRESS to improve the look and feel of the interface it gives the error--"Sys.WebForms.PageRequestManager TimeOut Exception: the server request timed out .
",Can anybody help me out to overcome this problem.
Thanx in advance.
modified on Tuesday, April 28, 2009 5:00 AM
|
|
|
|
|
Make your code faster or extend the timeout in the configuration file...
|
|
|
|
|
Set the AsyncPostBackTimeout property to some big value like "3600"(for 1 hr). The value has to be in seconds.
|
|
|
|
|
hello,
i have an XML file which is located in the root dir of my project.
i want to read it via a regular class ( not connected to a web page. i use it as a singleton for various services)
when i put only the file name , i get c:\windows\system32\filename.xml
how can i retreive the current dir of the website?
tnx,
avi
|
|
|
|
|
Server.MapPath(YourFile) ?
|
|
|
|
|
Server is not recognized there because the class is not part of a webpage,
so what should i do ?
|
|
|
|
|
System.Web.HttpContext.Current.Server.MapPath("YourFieName")
|
|
|
|
|
ok , it works.
what if i have more than one file with same name at my project?
what will the value be ?
|
|
|
|
|
is that possible to have files which has same name in a folder ... I dont think so ...
|
|
|
|
|
i see, so it looks on the current path i am in and not also in its subs
ok , thanks
modified on Tuesday, April 28, 2009 6:35 AM
|
|
|
|
|
Use the following code
//Gets the physical path of the application directory
string path = System.Web.HttpRuntime.AppDomainAppPath;
//Return the file names in the application folder
string[] myFiles = System.IO.Directory.GetFiles(path);
|
|
|
|
|
You can use
Server.MapPath(.)
to retrive current directory of you website.
|
|
|
|
|
how to download wallpapers in ASP.net using C#
plz help
|
|
|
|
|
shaludekate wrote: how to download wallpapers in ASP.net using C#
ASP.NET is not built for wallpaper download.
|
|
|
|
|
|
Hi all,
In testing of my web application, the customer has entered in a multi line text box a text from more than 200 letters with no spaces in between words (smart customer Ah!)and i have sat the width in %. When saving the design of the page was corrupted and the width of page became equal the width of the textbox. i have tried wrap property but didnt solve my issue. Still the width of page is affected by width of textbox.
Is ther a way that i can prevent page width from growing with textbox width other than putting textbox width in pixels. thanks
|
|
|
|
|
Hi, can you post your code?
I think its better to use CSS.
Hope this one can help.
Thanks
Hi, Please select Good Question if my answer are fit to your Question.
|
|
|
|
|
<asp:textbox id="txt" runat="server" width="95%" xmlns:asp="#unknown">
TextMode="MultiLine" Wrap="False" />
i have used both wrap=true and wrap=false. didnt work!!!!!!!!!!!
|
|
|
|
|
Hi guy,
The 'nowrap' property won't take effect on the width in % but px.
You can set the width of controls in px and the same time set the 'nowrap' property to controls.
Welcome to www.softwaretree.net!
This website is generated completely by static html pages transforming technology.
You can find many excellent audio/video tools there!
|
|
|
|
|
i cannot put width in pixels especially with different users with different resolutions it will mess up the design.
|
|
|
|
|
Try by providing the style value...
<asp:textbox textmode="MultiLine" id="TextBox1" style="overflow: auto;" xmlns:asp="#unknown">
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
width =95% might not work
Better create a class in your css and add CssClass='createdClass' to your TextBox
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Fix the text box control's width in pixels not in percentage. It will solve your issue.
Either you love IT or leave IT...
|
|
|
|