|
I have a slight problem with the window.print() function. When there are more data than what my DataGrid can display within its define height, a vertical scrollbar appears. When the user clicks the print button, it only prints out what is currently display on the screen. Is there a way for me to get it to print all the data that is on the DataGrid instead of having the user scroll down on the DataGrid to print out the rest of the data? I have noticed that certain websites have a "Printer Friendly Version" button that when clicked will format all the information on the page so that all the contents can be printed. Is there a way to do this in C#, thanks.
|
|
|
|
|
Hello,
We have a windows 2003 server and we were able to publish our websites
(developed on XP prof) before. Now, we have made some changes to our
site and want to republish to the same folder and it doesn't publish
now. At the end it also asks
"Existing files in the destination location will be deleted continue?"
I said yes but when I look at webfolder on the server (2003 server) I
see all the old files but not the new ones.
Am I missing some thing here? We haven't made any changes to our
windows 2003 server or on our development machines either. I also tried
publishing our site to a new web folder under the same website but it
doesn't work either.
But I can publish it to my local inetput/wwwroot folder. But can't on
the remote server where we used to publish before.
I think may be its because of the permissions but not sure how to
configure them.
Please help,
Thanks
-L
|
|
|
|
|
is it possible to bind data from two diff.database's tables in a single datagrid?how?
|
|
|
|
|
If the two tables are relatable they can be JOINed in a SQL statement. This would result in a single DataTable with the data from the two database tables, which could then be bound to a datagrid. For example, the following SQL statement selects all the distinct customers who have placed orders (pulling CustomerID from the Orders table, and joining in the associated CustomerName from the Customers table):
Select Distinct
o.CustomerID
, c.CustomerName
From Orders o INNER JOIN Customers c ON o.CustomerID = c.CustomerID Is this what you were talking about?
|
|
|
|
|
Create one datatable in your code behind file. (The DataTable is an in-memory representation of a block of data).Get the data from the database in two different datasets. Then fill the created data table with data from the different datasets available from different tables. (You have to programatically fill each column in the datatable). After filling the manually created datatable, bind the datagrid with this table.
From the above solution, you are binding the data grid to the manually created datatable in your code. The datasource can be anything. But be cautious this can reduce the performance of the application.
Hope this will help you
Thanks
Rakheesh
|
|
|
|
|
I have to validate the textbox 's text compare with dropdownlistbox items.
|
|
|
|
|
|
Just wonderin if anyone knew of any good sample's of character counting upon a webform so that users know how many characters they have left.
Any help is much appreciated.
|
|
|
|
|
|
Yeah the last example was similar to wat I was on about. instead of counting up Iwas wanting to count down and apply it to a label instead of a textbox. Got it sorted. Cheers King
|
|
|
|
|
I have a listbox with SelectionMode=Multiple in my script (VB) I can't seem to access all the selected values only the first one.
I've tried: (Search is my ListBox's ID and i is a number (I tryed 0, 1, and 2)
Search.SelectedValue (I get the first selected value)
Search.SelectedValue(i) (I get the character at position i)
Search.SelectedItem().Value (I get the first selected value)
Search.SelectedItem(i).Value (I get an error: 'Class 'System.Web.UI.WebControls.ListItem' cannot be indexed because it has no default property.')
Search.SelectedIndex().ToString (I get the first selected index)
Search.SelectedIndex(i).ToString (I get an error: 'Public Overridable Property SelectedIndex() As Integer' has no parameters and its return type cannot be indexed.)
I saw someplace that said to use Search.SelectedItems.Count and then loop using Search.SelectedItems(i).Value, but SelectedItems is not a member of 'System.Web.UI.WebControls.ListBox'.
Anyone know what I'm missing?
|
|
|
|
|
dim value as string
for each anItem as ListItem in Search.Items
if anItem.Selected then
value = anItem.value
'Do something with the data here
end if
loop
I think that's the Vb.net syntax...
|
|
|
|
|
anybody to help me to get the basics start in asp.net.. all i need is some codes with simple syntaxes to as i can get to know about this.. or where can i get some notes or book on asp.net
thank u all very much.......
ZuKzEx RuLz.....
|
|
|
|
|
|
hi all
is it possible to localize the telephone no
that is for india 91 -xxxxxxxxxxx
for some others (000)000-99999
coolsweety
|
|
|
|
|
hi
I am using a query like
select * from cars where car_make in('BMW','Mercedes','Accura') But it gives an error if I use Single Qoute in any car_make for example...
select * from cars where car_make in('BMW','Mercedes','Accura','infin'it')
I am using MySQL with vb.net.
THanks in advance
Lets work it Out.........!
|
|
|
|
|
If you were using SQL Server, you would have to write :
select * from cars where car_make in('BMW','Mercedes','Accura','infin''it')
For MySQL I am not sure, but try it this way.. I hope it'll work.
|
|
|
|
|
In fact these are two single quotes (not a double quote).
|
|
|
|
|
Use parameterised queries, or replace the quote with two quotes.
|
|
|
|
|
When Send Email from LocalHost this error is occur please Help me
this is the error :
Server Error in '/barakaHmg' Application.
--------------------------------------------------------------------------------
The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available
Source Error:
Line 76:
Line 77: SmtpMail.SmtpServer = "localhost"
Line 78: SmtpMail.Send(MailMessage)
Line 79: MailMessage = Nothing
Line 80: Response.Flush()
Source File: C:\Inetpub\wwwroot\barakaHmg\SendMail.aspx.vb Line: 78
/////////////////////////////////////////////
thanks for all
-- modified at 8:46 Wednesday 19th April, 2006
|
|
|
|
|
That's very likely because your machine (localhost) is not an SMTP Server.
حظا سعيدا
|
|
|
|
|
Hello,
Do you have SMTP Server correctly installed on your server, are you trying to access to a different server?
Check this website, it's a good starting point:
http://www.systemwebmail.com/[^]
Good luck
Braulio
/// -----------------------
Braulio Díez
http://www.bdiez.com
/// -----------------------
|
|
|
|
|
hi,
in my page load iam creating a row consisting of text box,drp down and button. on clicking the button a similar row should be created. how to fire the event of dynamically created button? code is there but not working. plz help me out
Regards,
Boon
|
|
|
|
|
Hi there. Are you assigning the event handler function to your button's click event? myButton.Click += new System.EventHandler(myButtonClickHandlerFunc);
Here's a fuller example of the kind of thing you're describing. Does this help?
<% @Page Language="C#" %>
<script runat="server">
const string SESSION_ROWCOUNT = "RowCount";
void Page_Load(object o, EventArgs e)
{
if (!IsPostBack)
CreateARow(0);
else
RecreateRows();
}
void CreateARow(int index)
{
TableRow r = new TableRow();
TableCell c = new TableCell();
TextBox tb = new TextBox();
tb.ID = "text_" + index.ToString();
c.Controls.Add(tb);
Button b = new Button();
b.ID = "button_" + index.ToString();
b.Text = "Add Another";
b.Click += new System.EventHandler(ButtonClick);
c.Controls.Add(b);
r.Cells.Add(c);
myTable.Rows.Add(r);
Session[SESSION_ROWCOUNT] = myTable.Rows.Count;
}
void ButtonClick(object o, EventArgs e)
{
CreateARow(myTable.Rows.Count);
}
void RecreateRows()
{
int iCount = 0;
if (Session[SESSION_ROWCOUNT] != null)
iCount = Convert.ToInt32(Session[SESSION_ROWCOUNT]);
for (int i=0; i<iCount; i++)
{
CreateARow(i);
}
}
</script>
<html>
<head>
<title>Dynamic TableRow Example</title>
</head>
<body>
<form runat="server">
<asp:Table id="myTable" runat="server">
</asp:Table>
<br />
<br />
<asp:Button id="btnForcePostback" runat="server"
Text="Force a non-row-creating postback"
/>
</form>
</body>
</html>
|
|
|
|
|
Please Help me to find Way to send E-mail From localhost
Please With Detail
:-Dthanks
|
|
|
|