|
Just execute this JS command on the client: document.print();
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi , Please guys i wanna know why adding this TableAdapter to Vs 2005 ? hat is the benifit of using a TableAdapter rather than a DataAdapter ? How this TableAdapter works ? can you explain to me with some few examples pls ?
thank you very much
an other thing i wanna know also that SqlDataSource object , when do we need it ? why using this object ? how is it constructed ?
i really need help to understand those news features of asp.net 2.0 so pls if you can help me do your best to let me understand
Thnx everybody
try to be good if you can't be the best
|
|
|
|
|
Hi
Assume we have a datalist that is populated from database and every item in it has an associated ID and we would place a check box under each item . Show me the technique of iterating through items in the DataList and finding out if any of them are selected and getting its associated ID.
have a problem with this method.
I have a button that when clicked ,in its click event, I iterate through the datalist but I find all check boxes unchecked even when they are selected.why this happens?
refer me to a useful article about this or tell me yourself.
|
|
|
|
|
can u please explain ur problem?
|
|
|
|
|
Hi
I am trying to display a Crystal Report developed using MySQL database and ASP.NET 2.0 (VS.NET 2005), and for some reason when I pass the database login information to the report it does not accept them (still shows a db login screen). Here is the code:
[CODE]
Dim cnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=servername;DATABASE=dbname;UID=user name;PASSWORD=password;OPTION=3"
Dim cn As New OdbcConnection(cnString)
cn.Open()
Dim MyReport As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
MyReport.Load("C:\Inetpub\wwwroot\Report1.rpt")
MyReport.SetDataSource(cnString)
MyReport.SetDatabaseLogon("username", "password")
MyReport.SetParameterValue("parameter1", "1001")
CrystalReportViewer1.ReportSource = MyReport
CrystalReportViewer1.DataBind()
cn.Close()
[/CODE]
I have one Crystal Report Viewer and one Crystal Report Source objects on the form. The Crystal Report Source is set to "Report1.rpt" and the Viewer's source is set to that as well. When I run it, I get a parameter field request followed by a server login information request.
The actual Report properties are:
Database DLL: crdb_odbc.dll
DSN: NameOfDSNSource
UseDSNProperties: False
UserID: databaseUserName
I have even tried this:
[CODE]
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.IO
Imports MySql.Data.MySqlClient
' Class Name etc here ...
Dim conn As New MySqlConnection
conn = New MySqlConnection("Server=servername; Database=dbname; User ID=dbuser; Password=dbpass; charset=utf8;")
conn.Open()
Dim MyReport As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
MyReport.Load("C:\Inetpub\wwwroot\Report1.rpt")
MyReport.SetDataSource("Server=servername; Database=dbname; User ID=dbuser; Password=dbpass; charset=utf8;")
MyReport.SetParameterValue("parameter1", "1001")
CrystalReportViewer1.ReportSource = MyReport
CrystalReportViewer1.DataBind()
[/CODE]
But so far no luck. Does anyone know what the problem is with it? Any help would be appreciated.
Thank You
|
|
|
|
|
Hi
Every body i need help.My question is conected with even OnClick on server side.So i get some PostBackUrl from Db who is change for every postback randomly.When is a clicked botton i go to Redirected page unfortunatly when i click back on web browser my pictures is same but my redirection is diffrent.I put that in if(!PostBack) but now how to store the url for last click and if i have same page in different window??Please help.
her is a code
//Url who is appear when button is pressed
private String sLinkUrl;
protected void imgBut_Click(object sender, ImageClickEventArgs e)
{
if (sLinkUrl == null)
{
sLinkUrl = Session["Url"].ToString();
}
Response.Redirect(@"http://"+sLinkUrl);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//idBanner
int nId;
///Title of banner
String sTitle;
///Imagine Url
String sImgUrl;
//check if GetRandomBanner function have online banner
if (ControlAccess.GetRandomBanner(out nId, out sTitle, out sImgUrl, out sLinkUrl) > 0)
{
//set title
imgBtn.ToolTip = sTitle;
///set imagine url
imgBtn.ImageUrl = sImgUrl;
//Add object to the sesion state
Session["Url"] = sLinkUrl;
}
HttpContext.Current.Trace.Write(ControlAccess.SumBannerImpression(nId).ToString());
}
}
<asp:imagebutton
id="imgBtn"
="" runat="server" cssclass="ImgBanner" onclick="imgBut_Click">
Best regard
N.Nikolov
when i want to read something good just seat and type it
|
|
|
|
|
My problem with date datatype was not yet solved,Please give me some more ideas to rectify my mistake.
My problem ,i have given already in the message board.
Thanks for ur cooperation.
|
|
|
|
|
Continue in that thread, then.
---
b { font-weight: normal; }
|
|
|
|
|
How can we directly get site root address programmatically independent of on which host the site resides.(e.g. http://www.o.com , http://www.ww.com)
-- modified at 7:19 Saturday 23rd September, 2006
|
|
|
|
|
CAN WE CREATE DYNAMIC EVENTS FOR DYNAMICALLY CREATED SERVER CONTROLS.IF SO THEN HOW WE CAN ACCOMPLISH THIS.
ABHIJEET BASU
SOFTWARE ENGINEER
|
|
|
|
|
hi,
how to convert long type to time
Senthil kumar
|
|
|
|
|
That depends on what the long value represents in the respect of time. If it for an example represents seconds since a given time, you can use the AddSeconds method to calculate the time it represents.
---
b { font-weight: normal; }
|
|
|
|
|
my datatable is having five columns, I want to display only three columns in the datagrid,values of fourth and fifth colums should be display only after clicking button in the fourth and fifth columns .
|
|
|
|
|
Set AutoGenerateColumns="False" on your datagrid, and then manually set the columns marking the ones visible=false as needed.
|
|
|
|
|
Hi,
I am facing specific problem with firefox browser. I have integrated payment gateway in my website. it is working fine in internet explorer. But I am facing problem with firefox and opera browser. I have some values in session like client id, client name. when I redirect from payment gateway to own site(e.g. thankyou page) I want to access all session variable. It works fine in IE but in other browser session value destroy. it works in local system problem is with online only.
Plese Plese Plese Plese Plese Plese Plese Plese Plese Plese give me any solution
Thanks.
Bhushan
|
|
|
|
|
The session variables are stored in the Session object for the user on the server. There is no way that you can access session variables from a different server or even a different web application on the same server. The user is identified by a cookie, and that cookie is local to the domain, so when a user goes to a different site, he becomes a new user.
If you want to send information between web applications, you have to send it along as post data or querystring data.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for your reply .
But I am not accessing session variable in payment gateway. there is no problem with payment gate way. Problem occures when I return back from payment gateway to my own web page. e.g.-
step 1. payment page(my website page)
step 2. paypal (payment gateway)
after successfull payment on payment gateway when we click "return to merchant" button..
step 3. thankyou page (my website page)
I want to use session variable "I created in payment page(my website page)"
I can use these session variable in IE but in case of firefox or opera I cannot get these variables.
Thanks
Bhushan
|
|
|
|
|
HI Every1
I have one dataset which contains datatable.I want to fire the query on that datatable?Is it possible?How can I do it?Pls reply me if u have any ans. it's urgent.
Thanx
monika
|
|
|
|
|
I think u r using dummy table.and then putting that dummy table into the dataset.
Now before putting the dummytable inti the dataset u should put only those columns of datatable which r required or u can use row filter function of dataview.
or the following cod ecan help me get rig of ur problem.
Take a variable of type dataview
Dim dvwPages As DataView
now put ur dataset into the dataview
dvwpages=ds
now if u have any datagrid to populate it with that database
and also want to make some order
for that
dvwPages.Sort = "field name of dummy table"
now that datagrid
dgrdPages.DataSource = dvwPages<br />
dgrdPages.DataBind()
-- modified at 3:12 Saturday 23rd September, 2006
|
|
|
|
|
Hi,
+You may Refer DataView Class[^]
+This DataView Class will help u, for getting the customizied view of ur DataTable.
Regards,
Jay
|
|
|
|
|
Hi,
If u r using VS 2005, You may use DataSet Designer. It is very useful.
DataSetDesigner[^]
Regards,
Jay
|
|
|
|
|
Here I have a problem that .i am using calender in my webform,when i pick a date from calender into a textbox and again i need to insery that Textbox value into Database Date/time datatype column.
my code is as below
cmdins = "Insert into Employee(empid,dateofbirth)values('" & txteid &"','" & txteid &"')"
Here the error is ,the conversion of char datatype to small date/type resulted outofrange value.
So how to convert this textbox value(ie date)to insert into database table.give me a solution.
|
|
|
|
|
Both textboxes have the same id?
Apply # to the adjacent of textbox values for date for conversion(if u have date datatype in the database.)
|
|
|
|
|
Dim dob1 As Date
dob1 = Date.Parse(Txtdob1.Text)
cmdins=insert into employee(empid,dateofbirth)values(1,#" & dob1 & "#)"
Here in my database its datatype is smalldatetime and
i am trying to isnert as above with the date 05/09/2006,it is giving error as ,
'#5' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
How to give correctly,
Give me an idea
|
|
|
|
|
If u r using sql server then just use single codes don't use # otherwise in case of access it is right.
Now the qusetion is which database u r sging
|
|
|
|