|
the page contains treeview and 2 datalist, the data on these controls is loaded based on the values on the URL,
as you said the values should be available locally ,
hope im conveying the problem in right words
regards
winnie
|
|
|
|
|
OK, you should use ASP.NET AJAX for this, which will just wrap everything for you. Trying to populate those controls using your own JS is a PITA. If you put everything in an update panel, it will just AJAX it for you.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
Hi Guys,
When i LogOut a user on my site a User is still able to hit the Back button in their browser and essentially view a logged in only page.
Ideal scenario would be for this page to send them to Login screen.
What would be the best way to stop this from happening?
FYI.
When a user logs in, i store a loggedIn value in a session variable.
On logout i reset this session to indicate the user is loggedOut.
I am using c# .net
Many Thanks.
|
|
|
|
|
You need to make sure the browser doesn't cache your page. If you hit refresh, does it go to the login page ? If so, this is your problem. Put Response.Cache.SetCacheability(HttpCacheability.NoCache) in your pages, preferably via a common base page ( the place where you check if the session is set is a good place to do it.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
HI friends, this question is regarding Crystal Reports in VS 2005
My report here is attached to a SP. I'm trying to pass parameters but it raises an error:
Procedure or function 'sp_wfsAppByCounsReport' expects parameter '@StartingDate', which was not supplied.
Here is my code, I'm passing the parameter. I can even trace it and the rdDocument variable has them attached after the SetParameteValue....why the report is not sending them to the SP???
Here is my code:
protected void Page_Load(object sender, EventArgs e)
{
DateTime dtStartingDate = DateTime.Parse(DateTime.Today.Month.ToString() + "/" + "1" + "/" + DateTime.Today.Year.ToString());
ConnectionInfo ciLogin = new ConnectionInfo();
ciLogin.ServerName = "myserver.com";
ciLogin.DatabaseName = "mydb";
ciLogin.UserID = "dbuser";
ciLogin.Password = "mypass";
TableLogOnInfo tbLogonTable = new TableLogOnInfo();
tbLogonTable.ConnectionInfo = ciLogin;
ReportDocument rdMonthReport = new ReportDocument();
rdMonthReport.Load(Server.MapPath("couns-month.rpt"));
rdMonthReport.SetParameterValue("@StartingDate", dtStartingDate);
rdMonthReport.SetParameterValue("@EndingDate", DateTime.Today);
foreach (CrystalDecisions.CrystalReports.Engine.Table tbTable in rdMonthReport.Database.Tables)
{
tbTable.ApplyLogOnInfo(tbLogonTable);
}
CrystalReportViewer.ReportSource = rdMonthReport;
CrystalReportViewer.RefreshReport();
}
Any help is appreciated!!
|
|
|
|
|
Is your date format correct ? Is MM/DD/YYYY what your server expects ? any need to write code that works out hte local format and uses it ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I think so. The parameters in the SP are DateTime..and I'm passing DateTime as parameters too.
|
|
|
|
|
I created one page which contain one timer which will execute some function after every 5 min and send one mail to my id. Now the problem is i m not able to stop that one after every 5 min i receive mails. I close that page so it not execute but still it is running. How to stop that timer.
|
|
|
|
|
I don't see how that is possible. How do you set your timer ? Posting code would help.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
The timer should stop when you leave your application i.e. close your web browser
|
|
|
|
|
Well, obviously. I am assuming that he's perhaps running a timer in his code behind, given that he's using it to send email. I then assume it isn't within a page, given that it runs on a timer. This would explain why it keeps running, it's server code that runs outside a page. But, unless he answers my question, it will be hard to help him further.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
sorry for late reply..
Timer timer = null;
timer = new Timer();
timer.Interval = 120000; //60 seconds (10000 - 10 seconds)
timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
timer.Enabled = true;
timer.Start();
this is in page load event and i m calling timer_Elapsed function....
void timer_Elapsed(object sender, ElapsedEventArgs e)
{
AutoSendMailToCustomers();
}
|
|
|
|
|
Hi ,
how to display and refresh images on after the page load completed using Asp.net Ajax concepts (Updatepanel and timer control or etc ) .
like
sdfjshjdfnksandfnsandfnsdjnfsndfnsdnfmnsdmnfnsdfndsdhsdfsdjk
sdjfhsjdhfjshjfjdjfjsjdkhfjsjjdfhkjdhskjfjskhfjhjdhfjhsjjdfhjshjf
sdhgshghdghsgfhdghsghdgdghsdhsdfhdsfdhghsfhgsdhfhsgdhghsdhfshgdfgsdgfh
djhjsfjsdhjfhsjdhfjhdhfshdhfsjhdjfhsjdhfjhsjdhfjshdjfhjsdhfjsdfsdfS
jsjdhjsdjsdshdsdhsjhdjshjdhjshdjhsjdjhsjhdjs
pageload ...
pageload completed .
display the image1 on div
<asp:image mode="hold" xmlns:asp="#unknown">
delay 3 sec
display or refresh image 2 on same div
<asp:image mode="hold" xmlns:asp="#unknown">
delay 3 sec
display or refresh image 3 on same div
<asp:image mode="hold" xmlns:asp="#unknown">
thats it ..
it is a simple.. i done but i am not getting on div ?..
if u know how to do or done ..
send me replay to here
or mail me :
mails2dhanunjaya@gmail.com
Thanks ..
Dhanu
|
|
|
|
|
I am certain there's a control built into that library that does this for you, you just provide the image URLs
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi,
I'm adding a button to an existing app. I need to open a new window once this button is clicked. The new button has been added to an existing User Control and takes on all the attributes of the other buttons. Great.
I need to add an onClick event to my button in the code behind that will open a new browser via some javascript (window.open). When I add it it and run the code it renders the button with 2 onClick events (1 from the global attributes of the user control I guess) My onClick doesn't funtion (not a shock) I know I can have 2 functions running on 1 onClick - I separate with a semi-colon - how do I merge my onClick event into the existing one? Attribute.Add("onClick"),myButton creats a new one.
Any ideas welocme !!
Thanks
|
|
|
|
|
suppose one combo box have 10 values then how to pick up 5th value from combo box using java script function ?
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
trilokharry wrote: suppose one combo box have 10 values then how to pick up 5th value from combo box using java script function ?
alert(document.getElementById('ddlID').options[5].value);
regard
khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
hi all,
can any one help...im fairly new at C#...im trying to pass data from my master page to a page in my content place holder...please help...thanks in advance.
living life on the flip side
|
|
|
|
|
So you mean youve got a masterpage and then that is included in your main page.
How are you passing data?
Normally a masterpage is included in every normal page and thats where you get the main style/layout to
|
|
|
|
|
i have my master page..with a content place holder on it and in the content place holder...is the new page. what happens is...i click on my treeview in the master page and i want to send the values of the treeview to my page in the content place holder...i hope this helps
living life on the flip side
|
|
|
|
|
hello sir
i am using master page in webapplication.
and i used c# language.
i have one .js file.
i want to use it in my application.
i want to add form tag because i want to write this code
where i add form tag.bec i used masterpage.
pls help me its really urgent.
gayatri
Gayatri
|
|
|
|
|
where do you want the form tag? or are you asking where to put it?
Normally it would go in your aspx page
can you explain again
|
|
|
|
|
sir
i want form tag in my webform.
in that web form i used masterpage.
so when i take form tag that time i gave error.
so i ask you where i put it.
when i put it in content.that time i have error.
i want to use .js file.
the code ---
// JScript File
function valForm()
{
if(!valid_required(document.form1.txtFirstName.value))
{
alert("First name is required field.")
return false
}
return true
}
this i want to use in my webform's html source code
my code=-----
<@>
CodeFile="Client.aspx.cs" Inherits="Client" Title="Untitled Page" %>
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server" xmlns:asp="#unknown">
this code i have run time error--A page can have only one server-side Form tag.
so pls help me.
Gayatri
|
|
|
|
|
niki_nilu wrote: this code i have run time error--A page can have only one server-side Form tag.
Master Page already has a form tag.
you can use your javascript in head tag in master page.
please don't forget to vote on the post that helped you.
|
|
|
|