|
gareth111 wrote: pops up and counts through the pages which you can preview
the box is like "trackBar".. it shows you the progres of painting content to the paper.. in your PrintPage event of printDocument object use some int as a counter.. set it to 0 in BeginPaint event
life is study!!!
|
|
|
|
|
Seishin#: The PrintPage event is fired when your actually printing the data, i want to know BEFORE i print it, so i can display to the user the number of pages. eg Page 1 of 20.
Regards,
Gareth.
|
|
|
|
|
gareth111 wrote: PrintPage event is fired when your actually printing the data
nope.. don't confuse PrintPage event with Print method..
when you handle PrintPage event you implement the actual look of the page as it will be printed when you call Print method.. PrintPage event is fired for each page that will be printed and thats why you can put in it some pageCounter++ line to count pages..
when you open print preview it is generated with PrintPage event.
life is study!!!
|
|
|
|
|
Seishin#: Sorry, you were correct. The reason i was getting confused was i had some debugging in the PrintPage event which wasnt been displayed when the preview control was being created. Thus i thought the event wasnt the place i should be looking into.
Cheers,
Gareth.
|
|
|
|
|
i need an ftp source code to upload multiple files simultaniously using ftp
|
|
|
|
|
Wow. 5 crossposts about 3 issues in 10 minutes, all saying "I need x". You won't get that here. Ever. People here won't do work for you, unless you pay them.
|
|
|
|
|
i need code to split video file and merge the same to play..with regards
|
|
|
|
|
We won't do your work for you. If you need help with a specific problem, post here. We won't just give you code unless you pay us.
|
|
|
|
|
Hi all,
It seems the search function is down, so sorry if this kind of (beginner) question has come by too often.
I used the xsd.exe tool to convert an xml file provided from a 3rd party to xsd format, and then to classes as follows:
<br />
xsd.exe thefile.xml<br />
xsd.exe /c thefile.xsd
I imported the resulting .cs file into my project, which now defines the classes I need for the data. The "top" class derives from DataSet and is called NewDataSet.
Now for the questions: How do I import (deserialize) the actual data contained in thefile.xml into my NewDataSet class? I've tried the following, which doesn't work...
NewDataSet dataSet = new NewDataSet();
dataSet.ReadXmlSchema(@"thefile.xml");
Any help is greatly appreciated!
Standards are great! Everybody should have one!
|
|
|
|
|
NewDataSet dataSet = new NewDAtaSet();
dataSet.Load(@"thefile.xml");
Hope that helps.
Ben
|
|
|
|
|
Is that another type of DataSet? My DataSet.Load() method takes at least three arguments, of which none is either a file(stream) or string. It's defined as System.Data.DataSet.
Standards are great! Everybody should have one!
|
|
|
|
|
You should use ReadlXml method instead
|
|
|
|
|
Ok. That worked. Stupid of me that I didn't try so before... Thanks!
Standards are great! Everybody should have one!
|
|
|
|
|
How to print the Data from asp.net
Regards,
A Jabeer Ali
|
|
|
|
|
A Jabeer Ali, read: How to get an answer to your question.
Regards,
Gareth.
|
|
|
|
|
I need to print my whole asp page. Can you tell me the command
Regards,
A Jabeer Ali
|
|
|
|
|
|
hi all,
i need to provide update feature for that i have taken my current developing versions assembly version in to a string and now i wanna check it with the updated version,
please tell me how to do this,
and also please tell me how to connect to server from deployed build (f client machine)
thnx in advance
prashanth
|
|
|
|
|
Prashanth,
You shouldn't give up on ClickOnce. It will save you time and effort.
Connecting to http servers can be accomplished using the System.Net.WebRequest API. However, you're asking for more trouble. Use ClickOnce for application updates.
|
|
|
|
|
How to use the Javascript function in asp.net.
THis is my sample code.
<%@ Page Language="C#" AutoEventWireup="false" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script language="javascript">
function displayMessage()
{
alert("Hello world!");
}
</script>
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server" >
<div>
<asp:Button ID="Buton1" runat="server" Text="script" OnClick="displayMessage" />
</div>
</form>
</body>
</html>
Regards,
A Jabeer Ali
|
|
|
|
|
The OnClick method of your button needs to point to a method in your codebehind file. If you are using asp.net 2.0 you can set a onClientClick to your javascript method. If you are using asp.net 1.1 or 1.0 you need some code in the page load that takes the button control and does and Attribute.Add("OnClick","displayMessage");
Hope that helps.
Ben
|
|
|
|
|
Thank u thats working fine. and do you have any solution for the onload event.
Regards,
A Jabeer Ali
|
|
|
|
|
In the page load event
If (!IsPostBack)
{
Button1.Attributes.Add("onClick","displayMessage");
}
Ben
|
|
|
|
|
No No. I have done ur clientclick Event. Which is working fine. But i need the same type of event for the Page onload Event also. Would you help me.
Regards,
A Jabeer Ali
|
|
|
|
|
If you want some javascript to run when the page loads you will have to set the onload event in the body tag in your html.
Hope that helps.
Ben
|
|
|
|