
a1jit
Avatar/Signature-
Posts
89 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by a1jit
-
Hi, I dont really get the idea Do you have any short example and reference one the explanation stated above.. Thnk you very very much
-
Hi, thanks for the reply .. Yea, actually in the Button1_Click function, im redirecting the user to some path where they can download file.. Response.Redirect("http://10.204.237.97/WebDirectory/Report_"+zipFileName,false) And i realized, the label gets updated after it finish executing the Button1_Click Function if i comment the Redirect Statement. So is there any way to overcome this problem. I mean update label while processing the "Button1_Click Function" Because im just trying to display some label like "Please Wait, Request is being Process" when user click a button while the program is processing the request Thank You
-
Hi Guys, I found another weird situation.. This function executes when submit button is clicked..Works excellent void Label_Status(object sender, System.EventArgs e) { if (CheckBox1.Checked != true && CheckBox2.Checked != true) { Label5.Text = "Please select at least One Report"; } else { Label5.Text = "Request is being Processed. Kindly Wait."; } } It displays the correct label message When i change this function to the one below, the label for "else" statement does not get displayed. Meaning lets say no checkbox is selected, the label will have "Please select at least One Report". Works. But when one of the checkbox is selected, in debug mode, it goes through both the "else" statement but i doesnt print out "Request is being processed..." But the code above is without the "Button1_Click(sender,e);" statemet and it prints out the correct label. But this one below, does not. void Label_Status(object sender, System.EventArgs e) { if (CheckBox1.Checked != true && CheckBox2.Checked != true) { Label5.Text = "Please select at least One Report"; } else { Label5.Text = "Request is being Processed. Kindly Wait."; Button1_Click(sender,e); } } Im just confused
-
Hi, thx for the input.. When i check in browser the value is not sent, but when i debug, it executes one of the if condition. The browser displays <span id="Label1"></span> But when i put the if statement for this label code in Page_Load Function, it works properly.. so weird..no idea whats wrong
-
Hi Guys, Im not sure what is wrong here, but i have totally no idea what is happening I have a form with 2 checkbox and a label and also a submit button. Basically what im trying to achieve is when user click submit button, it check if none of checkbox is selected, then display message in Label saying "Pls select at least one checkbox" if either one checkbox is selected, then process request and display in Label saying "Pls wait, request is being processed. So now the problem is that everything works fine, but the message is not getting displayed in the Label (Name of this Label is Label1) This is the html code for label ..Its in the form tag <FORM runat="server"> <TABLE cellSpacing="0" cellPadding="5" width="53%" align="center" border="0"> <TR bgcolor=#ff9900> <asp:Label ID=Label1 Runat="server"></asp:Label> </TR> </TABLE> </FORM> All the labels and checkbox and also submit button has the "runat server attribute" Then when submit button clicked, it goes to Process function and checks whether the checkbox is selected or not and displays appropriate message if (CheckBox1.Checked != true && CheckBox2.Checked != true) Label1.Text = "Please select at least One Report"; else Label1.Text = "Request is being Processed"; this code is in the <script> tag. When i try to debug no error, and it moves to the correct path, meaning it executes that statement where the label is being assigned to some value, but i dont see it in the browser.. I dont know why for some reasons the text is not being displayed in the label. Would appreciate if someone could guide me here..thank you..
-
Hi Guys Actually im just a bit confused on asp.net page my asp page has html plus some c# code in it like this <%@ Page Language = "C#" %> <script runat = server> ...some code </script> <html> something </html> So, to debug, i change the directive to this <%@ Page Language = "C#" Debug = true%> And i placed my breakpoints.. Everything worked fine.. Only problem was lets say i place breakpoints at line 8, the code stops there, just as i want, but the value for the variable is not displayed when i place my cursor there.. Lets say Line8 has this statement result = i+b; And when i place my cursor at result, the value for result wont appear.. So how can i overcome this? Thank You
-
yup..im from malaysia too..nice knowing u.. still new to asp.net thx for the help
-
Hi, thx, that worked out well.. Looks like you are from malaysia too.. great.. thank you
-
Hi Guys, Im facing some problem getting image displayed on an asp.net page.. Currently this is the code i use to display an image <asp:image id="Image1" style="Z-INDEX: 107; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server" ImageUrl="\\10.204.237.97\Report\Images\Logo.JPG" Height="96px" Width="1800px"></asp:image><br> Whenver i view this asp.net page in my pc, the image gets displayed, but if its viewed from a differnt machine, the image is not loaded. The source code is located in "Report" Directory in "wwwroot" and image is located in "Report\Images" directory Something might be wrong with the path.. Can someone help me out..Thanks a lot..
-
Hi dynamic_sysop , Thank You very very much for the solution..Thankx for time spent on example.. Really appreciate it...really helps.thx..
-
Hi Guys, I wrote some simple code on having a progress bar. But i wish to do some enhancement. Its currently working as i want but i would appreciate if this two things can be completed as well. 1) Having the percentage in the progress bar itself. I mean each time it loops, the percentage which is placed in progress bar (acts as an indicator) increases as well..I dont want to place a label in progress bar, just wondering weather is the any property in progress bar that allows me to provide indicator in percentage 2) By default, the progress bar is showing grey color, can i change it to green or something to make it look more appealing int TotalRecords = 25000; //Initialized to 25000 arbitrarily progressBar1.Step = 500; progressBar1.Minimum = 1; progressBar1.Maximum = TotalRecords-1; for(int y = 0; y<TotalRecords; y++) { if (progressBar1.Value < progressBar1.Maximum) { progressBar1.Value += progressBar1.Minimum; Application.DoEvents(); } } MessageBox.Show ("Done");
-
wOWOWO..Excellentttt...thax a lottttt... But im confused a little if procs.Length == 0 , then we should start up Test.exe .. Normally if the file is not running, meaning procs.Length will return 0 right? And im confused about another thing.. Whenever i put this code and create new project as a "Windows Service", No matter the executable is running or not, it always says that its running. Although it is not running..Pretty weird.. If its windows application, when i debug, it works well.. But when i create a service, it does not.. Any idea?
-
Hi Guys, Is there any way to implement the logic below Check whether Test.exe is running or not. If its running, dont do anything. If it is not running, launch it Thank you very much
-
thank you very much..the link was very useful
-
Hi Guys, Im not sure why i cant get this done, Ijust want to retrieve two data 1) date (dd/mm/yyyy) 2) time (hh:mm:ss) Im doing this two statements but its not only giving me the date..I dont know why i cant get it formatted..Any help will be really appreciated System.DateTime.Now.ToShortDateString(),"dd/MM/yy" Time is working as i want but not date System.DateTime.Now.ToShortTimeString() Thank You
-
I see..Thank You very much Plausibly..really appreciate it..thxss..
-
So, where shall i place the Responce.OutputStream statement? Thanks..really sorry..im a bit new to this And another question, im using the code you provided to download the file FileStream fs; fs = File.Open("C:\\Inetpub\\wwwroot\\Web Directory\\test.txt", FileMode.Open); byte[] byBytes = new byte[Convert.ToInt32(fs.Length)]; fs.Read(byBytes, 0, Convert.ToInt32(fs.Length)); fs.Close(); File.Delete("C:\\Inetpub\\wwwroot\\Web Directory\\test.txt"); Response.AddHeader("Content-disposition", "attachment; fileName=" + "test.txt"); Response.ContentType = "application/octet-stream"; Response.BinaryWrite(byBytes); Response.End(); If you observer, the file is a txt file..works fine But if i change the extension to a .zip file, i get the following error.. How can i solve this. I have given full access to everyone in the security tab in the folder, but i still keep getting this error Exception Details: System.UnauthorizedAccessException: Access to the path "C:\Inetpub\wwwroot\Web Directory\test.zip" is denied. To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access. Line 32: FileStream fs; Line 33: fs = File.Open("C:\\Inetpub\\wwwroot\\Web Directory\\test.zip", FileMode.Open); Line 34: byte[] byBytes = new byte[Convert.ToInt32(fs.Length)]; Line 35: fs.Read(byBytes, 0, Convert.ToInt32(fs.Length)); Line 33 is throwing out the error..How shall i deal with this?
-
Mike, U are just great..its working perfectly now..and the link you provided is excellent.. reallyyyy good.. thank you very very much But i have a question.. Currently im creating the file first on server, then after that, i give the user to download it.. How can i straight away let user to download it while the file is being created?
-
Hi ..thankx a lot for the help.. I would appreaciate if you can help me converting it to c# I have done this..but results in some error.. FileStream fs = new FileStream(); string strContentType; StreamWriter streamWriter = new StreamWriter("C:\\Mail\\test.txt"); streamWriter.WriteLine("Date : "); streamWriter.WriteLine("From : " ); streamWriter.WriteLine("To : "); streamWriter.WriteLine("Subject : "); streamWriter.Close( ); fs = File.Open("C:\\Mail\\test.txt", FileMode.Open); Byte byBytes(Convert.ToInt32(fs.Length)); fs.Read(byBytes, 0, Convert.ToInt32(fs.Length)); fs.Close(); File.Delete("C:\\Mail\\test.txt"); Response.AddHeader( "Content-Disposition", "attachment; Filename = test.txt"); Response.ContentType = "application/octet-stream"; Response.BinaryWrite(byBytes); Response.End();
-
Hi, could you explain again..I dont get you.. Which part of my code shall i change?
-
Hi Guys, I was just wondering, how can i achieve this.. I want to create a csv file on server side and prompt user to download it using c# with asp.net I have written some codes which create a dummy text file..and some download code..but the download code does not fetch the actual test.csv file which i created, instead it gives me the html code where the download dialogue box was prompted StreamWriter streamWriter = new StreamWriter("C:\\Mail\\test.txt"); streamWriter.WriteLine("Date : "); streamWriter.WriteLine("From : " ); streamWriter.WriteLine("To : "); streamWriter.WriteLine("Subject : "); streamWriter.Close( ); Response.ContentType = "text/plain"; Response.AddHeader( "Content-Disposition", "attachment; Filename = C:\\Mail\\test.txt"); How can i solve this?
-
Guys, i just developed a simple code, opening up excel file.. And i keep getting error message saying that namespace for activexOject could not be found.. I have already included Microsoft ActiveXObject reference here..still getting the error.. Aany idea how to deal with this> // Declare the variables Excel.Application oXL; Excel._Workbook oWB; Excel._Worksheet oSheet; // Create the Excel application object. oXL = new ActiveXObject("Excel.Application"); oXL.Visible = true; ((Excel.Worksheet)oWB.Sheets[2]).Select( Type.Missing); oSheet = (Excel._Worksheet)oWB.ActiveSheet;
-
Is data repeater a control or something? Any reference on that? Thx a lot..
-
Ok the main objective that i want to accomplish here is to load data into spreadsheet from client side..i want the client to see the data while its getting loaded in