|
Hi,
One option could be:
Don't use Login Control. Create just 2 textboxes and one button. On the button click you can have this action:
protected void Signin_click(object sender, object args) {
if (Membership.ValidateUser(txtLogin.Text, txtPassword.Text)) {
FormsAuthentication.SetAuthCookie(txtLogin.Text, false);
string returnUrl = Request.QueryString["ReturnUrl"];
if (string.IsNullOrEmpty(returnUrl)) {
if (admin) {
Response.Redirect("my_admin_page.aspx", false);
} else if (user) {
Response.Redirect("my_user_page.aspx", false);
}
} else {
Response.Redirect(returnUrl, false);
}
} else {
}
}
Petr Pechovic
|
|
|
|
|
Petr Pechovic wrote: Don't use Login Control.
Yes, use the Login control. Override the appropriate methods, like OnLoggedIn[^]. There is no need to reinvent the wheel.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
That's why I wrote "one option could be"
|
|
|
|
|
Use the Login control. Override the appropriate methods, like OnLoggedIn[^].
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i need to inherit two datagrid control
please any body guide me to do this task
please give me the link where it is
its help me lot
|
|
|
|
|
What have you tried so far?
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
You can create UserControl and place 2 datagrid into it.
Its easy. Please let me know where the problem is ?
|
|
|
|
|
Read How to get answers to your questions at the top of this forum.
"Help" is not a subject that is helpful.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What do you mean by "inherit two datagrid control" ?
|
|
|
|
|
If U want it on ur page just drag and drop it into the aspx page from toolbox under data Tools.
Please be more descriptive in your problem.
|
|
|
|
|
I want to create a application in which i can send a mail and receive amail. i want to know that waht should i do for storing the dat.. should i store the mail message in to sql database. wher does it store. just tell mw where it store..
|
|
|
|
|
deepikadurge wrote: i want to know that waht should i do for storing the dat
It depends on how you need to access the data; you could use any appropriate database (SQL, Access etc) or a homemade file of some sort.
|
|
|
|
|
Are you going to create POP3/ICMP application ?
Or you want to use the existing mail server and store mails to your location programmatically ?
|
|
|
|
|
i want to craete an web app on my machine .. i want to store it in mail server.. but i cnt know the process of saving mail in mail server.. waht is the location for that..
|
|
|
|
|
If you have configured your smtp server you will have specified the path where mails should be stored .
Open IIS Console.
Right click on "Default SMTP Virtual Server" - > Go to Properties
In the Messages tab you will find the directory path.
Check the path you will find the mails.
By Default it will be stored in
C:\Inetpub\mailroot
You can also find the actual mailing path by right clicking on the domain you are using as mail server. Just Right click on Domain and find Drop MailBox.
Cheers.
|
|
|
|
|
I have writen the code for mail send.. it's running .. but i dnt knw where it is storing in pc.. how can i read the mail..
|
|
|
|
|
deepikadurge wrote: I want to create a application in which i can send a mail and receive amail.
You have to create one mail server rather than thinking about using DB.
What is your business requirments ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I am dng this for my knowledge .. can i create a mail server on my machine and how
|
|
|
|
|
Any sample for refreshing a Saved Crystal Report (saved with data) to latest data from DB?
|
|
|
|
|
Reload the page.
|
|
|
|
|
Disable the notorious "Save data" option in the report properties.
|
|
|
|
|
Hi Abishek and Shameel,
Thanks for your reply.
Actually we have already generated RPT files using Crystal XI. I'm trying to use from VS.NET 2005 to let users quickly refresh with latest data. When I tried to copy the RPT files to the application folder's subfolder named Reports and hardcoded the same foldername and the filename, it gives me Missing parameters while clicking refresh icon of the CrystalReportViewer (as per the attached code). Actually the report has saved parameters in it (I verified from application using reports ParameterField's HasCurrentValue property of each field in the loop).
My intention is to let user to click refresh icon of the embedded CrystalReportViewer to refresh the report (loaded from Reports sub folder as in code) with latest DB data and using the saved parameter values. That's all. As per the below code, It shows "Missing Parameters values" mesg. and the report did not get refreshed. When I commented the this.CrystalReportSource1.ReportDocument.Refresh(); line in ReportDocument_RefreshReport funtion, it shows "The Report Application Server failed" error mesg from the viewer, but the report get overwritten as per my intention. How to avoid this "The Report Application Server failed" error mesg. I don't know what am I missing here. Pls see the assemblies and code as below...
Attaching the code as it is not properly attached in my previous reply ...
=======================
Begin - aspx.cs code
=======================
using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.CrystalReports;
using CrystalDecisions.Shared;
using CrystalDecisions.Web;
public partial class _Default : System.Web.UI.Page
{
private ConnectionInfo connectionInfo = new ConnectionInfo();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//ConfigureCrystalReports();
}
}
protected void CrystalReportViewer1_Init(object sender, EventArgs e)
{
ConfigureCrystalReports();
}
private void ConfigureCrystalReports()
{
string reportPath = Server.MapPath(@"Reports\Report1.rpt");
this.CrystalReportSource1.ReportDocument.Load(reportPath);
CrystalReportViewer1.Visible = false;
SetDBLogonForReport(this.CrystalReportSource1.ReportDocument);
foreach (ParameterField field in this.CrystalReportSource1.ReportDocument.ParameterFields)
{
field.HasCurrentValue = true;
}
//this.CrystalReportSource1.ReportDocument.Refresh();
CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
CrystalReportViewer1.Visible = true;
}
public void ReportDocument_RefreshReport(object sender, EventArgs e)
{
try
{
SetDBLogonForReport(this.CrystalReportSource1.ReportDocument);
CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
this.CrystalReportSource1.ReportDocument.SetDatabaseLogon("user", "passwd", "server", "");
foreach (ParameterField field in this.CrystalReportSource1.ReportDocument.ParameterFields)
{
field.HasCurrentValue = true;
field.AllowCustomValues = true;
//field.EnableNullValue = true;
}
this.CrystalReportSource1.ReportDocument.Refresh();
this.CrystalReportSource1.ReportDocument.SaveAs(@"C:\Inetpub\wwwroot\XsiteRpt\Reports\Report1.RPT", true);
}
catch (Exception ex)
{
Msg.Text = ex.Message;
}
}
public void SetDBLogonForReport(ReportDocument reportDocument)
{
Tables tables = reportDocument.Database.Tables;
connectionInfo.ServerName = "server"; //ConfigurationManager.AppSettings["DBServer"];
connectionInfo.UserID = "user"; //ConfigurationManager.AppSettings["DBUser"];
connectionInfo.Password = "passwd"; //XsiteWinRpt.ConnUtil.GetOnlyPasswordOfConnString(); //ConfigurationManager.AppSettings["DBPassword"];
foreach (CrystalDecisions.CrystalReports.Engine.Table table in reportDocument tables)
{
TableLogOnInfo tableLogonInfo = table.LogOnInfo;
tableLogonInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(tableLogonInfo);
}
}
}
=======================
End - aspx.cs.code
=======================
=======================
Begin - Assemblies
=======================
<assemblies>
<add assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Enterprise.Framework, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</assemblies>
=======================
End - Assemblies
=======================
=======================
Begin - aspx
=======================
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Xsite.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!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">
<title>Refresh Report</title>
<link href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css"
rel="stylesheet" type="text/css" />
<link href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css"
rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="PanelMsg" runat="server">
<br />
<asp:Label ID="Msg" runat="server" Font-Bold="False" Font-Names="Verdana" ForeColor="Navy"></asp:Label>
<br />
</asp:Panel>
<asp:Panel ID="PanelViewer" runat="server">
<CR:CrystalReportViewer ID="CrystalReportViewer1" OnReportRefresh="ReportDocument_RefreshReport" runat="server" AutoDataBind="True"
EnableDatabaseLogonPrompt="False" EnableParameterPrompt="False" ReuseParameterValuesOnRefresh="True" HasRefreshButton="True" Height="820px" OnInit="CrystalReportViewer1_Init" ReportSourceID="CrystalReportSource1" ShowAllPageIds="True" Width="1215px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
</CR:CrystalReportSource>
</asp:Panel>
</div>
</form>
</body>
</html>
=======================
End - aspx
=======================
|
|
|
|
|
Hi Abishek and Shameel,
Actually the RPT files are already saved with old data. I need to refresh only.
Thanks.
|
|
|
|
|
then what is the problem. Just use location.href or location.replace .
Better check out this :
http://grizzlyweb.com/webmaster/javascripts/refresh.asp
Hoping this helps you.
Cheers.
|
|
|
|