|
hi
i want to print particular part of the page like datagrid for a report.
so how can it possible?
if any solution in Javascript, ASP.Net or CSS then you can reply me.
it's very important to me.
ok
Thanks
jigisha
|
|
|
|
|
Hi
Solution is
On pageload method just write as -
btnPrint.Attributes.Add("Onclick", "getPrint('print_area');")
(btnPrint is an id of html button control)
---------------------------------------------------------------------
------------Copy this function.......................................
function getPrint(print_area)
{
//Creating new page
var pp = window.open();
//Adding HTML opening tag with … portion
pp.document.writeln('<title>Print Preview')
pp.document.writeln('<base target="_self" />')
//Adding Body Tag
pp.document.writeln('');
//Adding form Tag
pp.document.writeln('');
//Creating two buttons Print and Close within a table
pp.document.writeln('');
//Writing print area of the calling page
pp.document.writeln(document.getElementById(print_area).innerHTML);
//Ending Tag of , and
pp.document.writeln('');
}
--------------------------------------------------------------------------
prakash sawant
|
|
|
|
|
Hi man
I wrote u some piece of code as a sample for ur question.
It's all about putting ur repeating control or the part you want in a div and give it an id and add the javascript
<html>
<head>
<script language=javascript>
function f1()
{
var divTest;
var divHTML;
var divText;
divTest = document.getElementById("testDiv")
divHTML = divTest.innerHTML;
divText = divTest.innerText;
window.alert(divHTML);
window.alert(divText);
}
</script>
</head>
<body>
<p align="center">
<input type="button" value="Test" onclick="f1();">
<br>
</p>
<div align=center id=testDiv>
<table width=500 border=1>
<tr align=center>
<td width=50%>Test Test Test</td>
</tr>
<tr align=center>
<td width=50%>Testing Testing Testing</td>
</tr>
</table>
</div>
</body>
</html>
Hope this would help
Best Regards
3ala2
|
|
|
|
|
Sir,
We use Public Functions and in it's definition using Get and Set Functions .Now the problem is When we can get each and every thing without using functions having Get and set functions in it's definitions .Then what's the advantage of using these functions.
Thanks.
|
|
|
|
|
I think you are talking about the properties not the functions. Properties are members that provide a flexible mechanism to read, write, or compute the values of private fields. Properties can be used as though they are public data members, but they are actually special methods called accessors. This enables data to be accessed easily while still providing the safety and flexibility of methods(source MSDN).
Best Regards,
Apurva Kaushal
|
|
|
|
|
Well you could use Getters and Setters as Java does (or did), but then you have 2 functions for each variable instead of one.
We could make the variable public, but then you can't add checks (and it's against incapsulation and thus against OO programming).
eg. (suppose x = private integer)
<br />
public int BiggerThenZeroAndSmallerThenHunderd{<br />
set{<br />
if(value < 100 && value > 0){<br />
x = value<br />
}<br />
else{<br />
}<br />
}<br />
get{<br />
return x;<br />
}<br />
}
hope this helps...
|
|
|
|
|
Hi,
1)how should i get the length of an audio file (eg. mp3 file )
2)Slice the audio file into several fragments
can anybody help me in this
Regards,
Sivaprasad
|
|
|
|
|
|
Hi
I am working on web application using ASP.NET,vb.net & backend as SQL SERVER 2000.
I want to pass one button through email...
When my application starts, one mail goes to the respective person.
This is the requirement of the project.
When that email goes, at the same time with that email i want to pass one button also.
On click of that button one field of the database table should get modified.
Plz. help me out.
Thanks.
Prakash Sawant
|
|
|
|
|
I think a button in a mail won’t work because an e-mail is not a web form. But you can set the <a> tags in the message body. Set the ‘href’ to a web form and write the code in that form’s page load event.
Regards,
Thomas
|
|
|
|
|
Sir,
Thanks for solution.
But the problem remains the same, yet.
I can send a button through email by writing the tag in body of email.
After sending a button through email, i want to do some database activity on click of that button and don't want to redirect any page from there.
So can u plz. guide me.
Thanking u.
prakash sawant
|
|
|
|
|
First of all do a aspx page that will be the template for the email.
After that send the generated html in the email message. Use "server.Execute" to get the html.
Here is a bit of code that does this:
http://www.daniweb.com/techtalkforums/thread38004.html
|
|
|
|
|
I still facing prob. regarding how to do operation on click of button which i am sending through email.
If i click of buttong send by email,
then onclick of that mail, i want to do some update operation in Sql Server table.
How to do this ?
prakash sawant
|
|
|
|
|
The event handler for the button on the aspx page will be executed.
|
|
|
|
|
Hi,
Suppose i want to change the value "A" and to replace it by "B" on click of the button , which i sent by email.
So,
when i just click on the button (in email)
the event should get fired and in SQL SERVER 2000, my data should get updated from "A" to "B"
How can i do this.
On click of the button (in email) no other link should get opened.
prakash sawant
|
|
|
|
|
in the code aspx page, in the code behind for the button, you'll have to write the code for the interaction with the database - the usual stuff (SqlConnection, SqlCommand, command.ExecuteNonQuery).
When the user clicks on the button the code is executed; if you don't redirect to another page, no other page is open.
|
|
|
|
|
Oh thanks.
I thought that it will be more complecated issue...........
Thanks a lot for ur great help.
|
|
|
|
|
I would like to add a checkbox control in first column of all the rows in a grid view, and associated settings at run time. How to make it?
Jey
|
|
|
|
|
I would to like add a check box control in first column of Gridview and specify the settings for that through coding. How to make it?
Thanks in advance!
Jey
|
|
|
|
|
I would to like add a check box control in first column of Gridview and specify the settings for that through coding. How to make it?
Thanks in advance!
Jey
|
|
|
|
|
you can get many examples related to gidview
Here[^].
And please don't repost.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks Guy, It's really useful link. Actually it was shown some error msg, while i posted the msg. so that i repeated it unknownly. It' wont happen in future.
Jey
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi there,
You need to use like this in Your GridView.
<Columns><br />
<asp:TemplateField HeaderText="SomeHeadingHere"><br />
<ItemTemplate><br />
<asp:CheckBox ID="cbox" runat="server" /> <br />
</ItemTemplate> <br />
</asp:TemplateField><br />
</Columns>
Also You may get some samples from Here[^]
|
|
|
|
|
Hello, everyone:
i am using treeview control of ie web controls in vs2003.
I have written a javascript code to CHECk - UNCHECK all the Child nodes if parent node is UNCHECKED or checked in the client side. However, when i click a button to retrieve the checked treenodes, all nodes' checked property is false. Why?? and how could i retrieve the checked node? any idea is appreciated, thanX in advance!
Regards,
Steven
|
|
|
|