|
I've not done this in VS 2008 / .NET 3.x. so some tinkering might be needed.
Check if you can associate a command name and a command event to the column, just try playing around with the item template. If you can then use it to raise the command event and invoke the edit mode for that row and take it from there.
|
|
|
|
|
Hello to All,
Actually I want to know that what is the procedure of Auto Generate Mail or SMS Delivery Message.
and
Secondly I want to Know that How Can I redirect my site to another site (While my site generate the error LIKE : Page not found or Site is going down.).
ThanksIf you can think then I Can.
|
|
|
|
|
you can use triggers to generate mails automatically.
to redirect to other site jst give
Response.Redirect(url)...
|
|
|
|
|
Thanks for responsing
I think Response.Redirect(URL) is for redirecting the page when it's working fine.
But I want redirect in another site when my Site not opening.
secondly
Can u give me any help for how to use triggerIf you can think then I Can.
|
|
|
|
|
you can redirect to new site using response.redirect and what exactly you want i dont get you.
for trigger just google it.there is lot of matter about trigger....
|
|
|
|
|
if my site is under construction then i want to use my another site to use at this url. If you can think then I Can.
|
|
|
|
|
Hello,
I have updated the post so please kindly look at the next one. Many thanks
|
|
|
|
|
Hello again,
please see the code below that I am using now and the error is right below it.
Do you know how to solve this error please?
Code:
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderStyle="Solid" BorderWidth="1px" CancelDestinationPageUrl="~/Default.aspx" ContinueDestinationPageUrl="~/Default.aspx" CreateUserButtonText="Sign Up" Font-Names="Verdana" Font-Size="0.8em" OnCreatedUser="CreateUserWizard1_CreatedUser">
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
<SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em" VerticalAlign="Top" />
<TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" />
<NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
ForeColor="White" HorizontalAlign="Center" />
<CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
<ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
<StepStyle BorderWidth="0px" />
</asp:CreateUserWizard>ERROR is:
CreateUserWizard1: CreateUserWizardStep.ContentTemplate does not contain an IEditableTextControl with ID UserName for the username.
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.Web.HttpException: CreateUserWizard1: CreateUserWizardStep.ContentTemplate does not contain an IEditableTextControl with ID UserName for the username.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): CreateUserWizard1: CreateUserWizardStep.ContentTemplate does not contain an IEditableTextControl with ID UserName for the username.]
System.Web.UI.WebControls.CreateUserStepContainer.get_UserNameTextBox() +1447655
System.Web.UI.WebControls.CreateUserWizard.CreateControlHierarchy() +34
System.Web.UI.WebControls.Wizard.CreateChildControls() +137
System.Web.UI.WebControls.CreateUserWizard.CreateChildControls() +26
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.WebControls.Wizard.OnInit(EventArgs e) +90
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
|
|
|
|
|
Hi All,
I want to create an Image to show the used space of each user.
I explain it in details.
Each user can login and can upload its document on the web.
I want to calculate that space and want to show the space used from of Image like attached.
I have calculated the space for logged in user but unable to create Image on basis of this calculated space.
Any help is appreciated.
ThanksBajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
I would add a new webpage.
In this webpage you have to query how many space is left or used by this user.
Now you should create a new Bitmap, make the drawings on it and then
write the new bitmap to the response stream (you also have to adjust the ContentType of the response).
Here is some sample code (not tested!) that should create an 100x40 (24bit color depth) bitmap.
The red part is the used and the green part is the free space.
ShowImage.aspx.cs
public partial class ShowImage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
Response.Clear();
int nUsedSpaceInPercent = 70;
Bitmap bmp = new Bitmap(100, 40, PixelFormat.Format24bppRgb);
Graphics gfx = Graphics.FromImage(bmp);
gfx.FillRectangle(Brushes.Green, new Rectangle(0, 0, 100, 40));
gfx.FillRectangle(Brushes.Red, new Rectangle(0, 0, nUsedSpaceInPercent, 40));
gfx.DrawRectangle(Pens.Black, new Rectangle(0, 0, 100, 40));
Response.ContentType = "image/png";
Response.BufferOutput = true;
bmp.Save(Response.OutputStream, ImageFormat.Png);
}
catch (Exception ex)
{
}
}
}
ShowImage.aspx (this is the full file!)
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowImage.aspx.cs" Inherits="SomeNamespace.Display.ShowImage" %>
<%@ OutputCache Location="None" %>
Hope that helps.Greetings
Covean
|
|
|
|
|
Please give me actual query for following action
I want data from two different database to single table
(as same field name)
ex. database1.table1 as field <name>
database2.table2 as field <name>
result into database1.table3 as field <name>
how to write query
thanking you
abglorie
|
|
|
|
|
This is ASP.Net forum.It'll be better if you ask your question in "General Database" forum. Cheers!!
Brij
|
|
|
|
|
select *
from FirstDatabase.dbo.Table1 t1
join SecondDatabase.dbo.Table2 t2 on t1.id=t2.id
where (your condition if any)Regards
Keyur Satyadev
|
|
|
|
|
abglorie wrote: Please give me actual query
No, we are not here to do your work. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi all,
I am using Local reports(RDLC) for my reports in Asp.net
I am have the following code in my button.I am able to send my pdf report as mail,and every thing is ok,
But Problem is I am unable to produce a Confirmation message,like "Mail sent successfully".How could i change my code.Pls help me Very Urgent.
Here it is skipping message.I am directly getting preview and sending mail.
Private Sub BTN_ITCLETMAIL_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_ITCLETMAIL.Click
Dim PrefAddrid As String = DDL_COMMUADDRS.SelectedValue
Dim rep As LocalReport = ReportViewer2.LocalReport
Dim Balmail As New Bal_EmailForm
RegisNum = Trim(LblItcRegNum.Text)
Dim conn As New SqlConnection(conString)
Dim da As New SqlDataAdapter
Dim ds As New ReportDataSource
Dim row As GridViewRow = Nothing
Dim Chkcount As Integer = 0
Dim intStatus As Integer
' ''For PDF
Dim warnings As Warning() = Nothing
Dim streamids As String() = Nothing
Dim mimeType As String = Nothing
Dim encoding As String = Nothing
Dim extension As String = Nothing
Dim bytes As Byte()
Dim FolderLocation As String
'Dim FLAG_VIE_REPORT As String
'' ====================
FolderLocation = Path.GetTempPath
Dim filepath As String = FolderLocation & RegisNum & "ITCLetter.pdf"
Try
File.Delete(filepath)
Session.Contents.Remove("Error")
rep.ReportPath = System.AppDomain.CurrentDomain.BaseDirectory & "ReportRdlcs\ITCLetter.rdlc"
Dim cmd As SqlCommand = New SqlCommand("RepGetOnlyAdderssDataForDemandLetter", conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@RegistrationNumber", RegisNum)
cmd.Parameters.AddWithValue("@PrefContactAdderss", PrefAddrid)
da.SelectCommand = cmd
myDataSet.Clear()
da.Fill(myDataSet, "RepGetOnlyAdderssDataForDemandLetter")
ds.Name = "AddressDetforDemandLetter_RepGetOnlyAdderssDataForDemandLetter"
ds.Value = myDataSet.Tables(0)
rep.DataSources.Add(ds)
Dim params(3) As Microsoft.Reporting.WebForms.ReportParameter
Dim strDemStudName As String = Nothing
strDemStudName = Trim(LBL_CLIENT.Text)
Dim p1 As Microsoft.Reporting.WebForms.ReportParameter
p1 = New Microsoft.Reporting.WebForms.ReportParameter("Name", strDemStudName)
params(0) = p1
Dim strDemAccountNum As String = Nothing
strDemAccountNum = Trim(TXT_ITCACCNUM.Text)
Dim p2 As Microsoft.Reporting.WebForms.ReportParameter
p2 = New Microsoft.Reporting.WebForms.ReportParameter("ITCAccountNum", strDemAccountNum)
params(1) = p2
Dim strDemOutstandingamt As String = Nothing
strDemOutstandingamt = Trim(TXT_ITCAMTOUTSTAND.Text)
Dim p3 As Microsoft.Reporting.WebForms.ReportParameter
p3 = New Microsoft.Reporting.WebForms.ReportParameter("ITCAmtOutstanding", strDemOutstandingamt)
params(2) = p3
Dim strCurrentDate As String = Nothing
strCurrentDate = Format(Convert.ToDateTime(dbToday.fdate), "dd MMMM yyyy")
Dim p4 As Microsoft.Reporting.WebForms.ReportParameter
p4 = New Microsoft.Reporting.WebForms.ReportParameter("CurrentDate", strCurrentDate)
params(3) = p4
If myDataSet.Tables(0).Rows.Count > 0 Then
Hidecontrols.Value = 1
ReportViewer1.Visible = False
ReportViewer2.Visible = True
ReportViewer2.LocalReport.SetParameters(params)
'' ''For PDF Conversion
bytes = ReportViewer2.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
Dim fs As New FileStream(FolderLocation & RegisNum & "ITCLetter.PDF", FileMode.Create)
fs.Write(bytes, 0, bytes.Length)
fs.Close()
Response.ContentType = "application/pdf"
Response.WriteFile(FolderLocation & RegisNum & "ITCLetter.PDF")
''For Sending mail
Balmail.ToAddress = Trim(TXT_StudItcEmail.Text)
Balmail.BccAddress = Trim(TXT_StudItcBCc.Text)
Balmail.CCAddress = Trim(TXT_StudItcCc.Text)
Balmail.Subject = Trim(TXT_ItcSubject.Value)
Balmail.Message = Trim(TXT_ItcBody.Value)
Balmail.Attachementone = FolderLocation & RegisNum & "ITCLetter.PDF"
intStatus = Balmail.SendMailNew()
If intStatus = 0 Then
Dim strScript As String = "<script type=text/javascript language=javascript defer=defer>;"
strScript += "myAlert('Management College of Southern Africa', 'Mail Sent Successfully', 'return false;');"
strScript += "</script>"
Page.ClientScript.RegisterStartupScript(Me.GetType(), "myAlert", strScript)
End If
Response.End()
Else
Hidecontrols.Value = 0
End If
Catch SqlExep As SqlException
s = "An SQL Server 2005 Exception Has Occured At: " + "<br>" + "<b>" + "Method Name & File Path & Line Number:" + "</b>" + Space(5) + SqlExep.StackTrace.ToString + "<br>" + "<b>" + "Error Description:" + Space(5) + SqlExep.Message + "</b>"
Session("Error") = s
Catch IOExep As IOException
s = "An IO Exception Has Occured At: " + "<br>" + "<b>" + "Method Name & File Path & Line Number:" + "</b>" + Space(5) + IOExep.StackTrace.ToString + "<br>" + "<b>" + "Error Description:" + Space(5) + IOExep.Message + "</b>"
Session("Error") = s
Finally
If Not (Session("Error") = "") Then
Response.Redirect("../Exception_Throw.aspx")
End If
RegisNum = ""
End Try
End Sub
Regards,
Narendra.S
|
|
|
|
|
do one thing see the code and match your code (code is in C# syntax).
//code
public static bool SendMail(string FromEmail, string FromName, string ToEmails, string MailBody, string Subject, string CcEmails, string BccEmails, bool IsBodyHtml)
{
try
{
System.Net.Mail.MailMessage objMail = new System.Net.Mail.MailMessage();
//Mail From Field
if (!String.IsNullOrEmpty(FromName))
{
objMail.From = new MailAddress(FromEmail, FromName);
}
else
{
objMail.From = new MailAddress(FromEmail);
}
//Mail To Field
if (!String.IsNullOrEmpty(ToEmails))
{
objMail.To.Add(ToEmails);
}
//Mail Cc Field
if (!String.IsNullOrEmpty(CcEmails))
{
objMail.CC.Add(CcEmails);
}
//Mail Bcc Field
if (!String.IsNullOrEmpty(BccEmails))
{
objMail.Bcc.Add(BccEmails);
}
//Mail Subject Field
objMail.Subject = Subject;
//Mail Body Field
objMail.Body = MailBody;
objMail.IsBodyHtml = IsBodyHtml;
try
{
SmtpClient smtp1 = new SmtpClient();
smtp1.Send(objMail);
return true;
}
catch (Exception ex)
{
//HttpContext.Current.Response.Write(ex.Message.ToString());
return false;
}
}
catch (Exception ex)
{
string mess = ex.Message.ToString();
return false;
}
}
// now in your code if its return true then fire your script. it will show the message as if your script is without error.Regards
Keyur Satyadev
|
|
|
|
|
Hi,Thanks for reply,
I am able to view message in other situations like inserting or updatating tables.
I am unable to get message in this particular scenario,when i render a rdlc report into pdf.
Regards,
Naren
|
|
|
|
|
Hi,
I want to select directory using fileupload or button(if possible). But using File Upload control it goes enter into that selected directory for file. I want to reach upto only that perticular selected directory.
How can I do this??
Thanks
sjs
|
|
|
|
|
You can not select a directory.This is file upload control,we can just files only.
Also Have alookCheers!!
Brij
|
|
|
|
|
i agree there is no such facility with fileupload control...
|
|
|
|
|
yes Cheers!!
Brij
|
|
|
|
|
Hi,
i just upload a ms document file from my local system. when i clicking on go button. its automatically convert into pdf format using pdf995. its working fine in my local system.
But its not working in server
suddenly displayed the foolowing error:
{Retrieving the COM class factory for component with CLSID {16AA0B9E-79AC-43B5-86CA-AB961FBEED5F} failed due to the following error: 80040154. }
could you please give me the possible answerYours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
have a look to the following links.
Link 1
Link2 Cheers!!
Brij
|
|
|
|
|
PDF CONVERSION
Dim filesource As Object ="\\192.168.0.1\d\kannan\document\test.doc"
Dim app As New Word.Application
Dim missingValue As Object = Type.Missing
Dim ac As New Word.Application()
Dim myTrue As Object = True
Dim myFalse As Object = False
Dim document As New Word.Document
app = ac.Application
app.DisplayAlerts = Word.WdAlertLevel.wdAlertsMessageBox
document = app.Documents.Open(filesource, myTrue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue)
app.ActivePrinter = "PDF995"
'app.ActivePrinter = "PrimoPDF"
app.ActiveDocument.PrintOut(myFalse, myFalse, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, myFalse, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue, missingValue)
document.Close(missingValue, missingValue, missingValue)
app.Quit(missingValue, missingValue, missingValue)
OPEN WORD DOCUMENT
Dim WordApp As New Word.ApplicationClass()
Dim missing As Object = System.Reflection.Missing.Value
Dim fileName As Object = TextBox2.Text
Dim newTemplate As Object = False
Dim docType As Object = 0
Dim isVisible As Object = True
Dim aDoc As Word.Document = WordApp.Documents.Add(fileName, newTemplate, docType, isVisible)
WordApp.Visible = True
aDoc.Activate()
this function all r working fine in local system. if i can using in iis showing COM errors....Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
Hi all,
Right now i am working on some S/W developement and in my project i want
to move columns of gridview to rightside or leftside at runtime and this gridview is generated at runtime.
so any one who has any suggestions on this pls reply....
Thank U
|
|
|
|
|