|
If you are using HTMLFormat you need to supply HTML format, you know, like in a webpage.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks for your reply, actually i too have formatted but the values are editable by the end user. They can give any type of words.......
|
|
|
|
|
Then you'll need to come up with a parsing engine to format the input appropriately.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
can you just explain in detail
|
|
|
|
|
If you want me to do the work, then contact me and we'll discuss rates
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
string msgBody = string.Format(@"Hi,
This is the format of Username and Password
UserName : {0}
Password : {1}
",yourUserNameVariable, yourPasswordVariable);
If you are saying the users can change the entire message (probably a bad idea) then you need to come up with some formatting engine somewhat like these forums where you can insert certain codes to get smileys or other formatting things.
|
|
|
|
|
padmanabhan N wrote: i have also tried "mailMsg.BodyFormat = MailFormat.Html; "
You may have tried this, but did you include some HTML tags in your code as well? Because just saying it should be HTML doesn't make it HTML in a flash, you'll need to code your text in HTML. IE: Let's say you username variable is a string _username, and you password is a string _password. Then try the following (in asp.net/c#):
On top of your page:
using System.Net.Mail
then in your SendMail method:
private void SendMail(string _username, string _password)
{
string MailBody = "Hi,<br /><br />This is the format of Username and Password<br /><br />UserName : " + _username + "<br />";
MailBody += "Password : " + _password + "<br /><br />Regards,";
MailMessage MMsg = new MailMessage();
MMsg.From = new MailAddress("youmailadress@youmailprovider.com");
MMsg.To.Add(new MailAddress("therecievingadress@therecievingdomain.com"));
MMsg.Subject = "Your subject";
MMsg.IsBodyHtml = true;
MMsg.Body = MailBody;
SmtpClient SMTPSender = new SmtpClient();
SMTPSender.Host = "your mailhost";
SMTPSender.Send(MMsg);
}
Hope this helps.
"My personality is not represented by my hometown."
|
|
|
|
|
Problem Statement:
Connection with server takes a long time and provides "No message either <big>it is timeout or someother thing other than time out</big>". The state of the mouse during that time will be in <big>"cursor: wait (an hourglass)" state</big>.
This problem is being faced occationationly, but now a days it become frequent.
Description:
The website is working properly as per the design flow.
We are having 3 types of users - one is for data entering people, one for maintaining database, one is endusers.
An enduser who is the customer of the website, should login with the main page of the website.
The enduser who is either the people entering data or the people maintaining database, should have to give login through the different page exists in the website. These two users comes under the catagory "admin".
According with the user as data maintaining or the user for entering data who have logged in, the co-ordinate page get opened for viewing & editing the customer details of the website for the user of data maintaining and the page through which the datas uploaded in the server, opened when the user is the people of entering data.
The problem facing is that when the user of the catagory "admin" logged-in, the coordinate pages is not getting opened according with the type of user logged-in. There is no error message occurs. After entering the username, password and when submit button is clicked, the mouse will be in "cursor: wait (an hourglass)" state until we closes the window forcibly.
Meantime, during the other period of time other than the period of problem, it is working fine with the same code. Now-a-days the problem is occuring frequent.
Also during this problem, only the users under the "admin" catagory faces this problem. The endusers who are the customers of the website, are able to login and there is no problem for them since they are log-in with different page.
What will be the problem? If it is with code, then it should stop working permenently. Now it is working partially which makes me get confused. Kindly help me regard this.
M.Sworna Vidhya
|
|
|
|
|
I don't think "coordinate" is the right word. Perhaps you meant "appropriate".
Does your app do any logging? Does the login process use the exact same code for all user types? Does this happen on multiple computers with multiple browsers? Have you been checking performance logs for the server and see if there are any memory, CPU or I/O bottlenecks during the problem times? What about your database? Have you been profiling and looking for deadlocks?
There are lots of problems with code that can show up only some of the time.
|
|
|
|
|
My reqirement is to capture the Master page event in The client page
In the click of Mater page button i have to control differnt client pages.
This click has different meaning at differnt pages
In the click of Master page button.
AT State page
It Should display all the state details
At city page
It Should display all the city details
how should i do?
Thanks in Advance
|
|
|
|
|
The question is a little unclear; however, if you have a buttons on the master page that are intended to open specific child pages I can't see what the problem is. Each button will have an event (which you need to hook up - open the page in design view and double-click on each button to create the event) that loads the specified page and then it is up to that page to carry out whatever tasks are required; e.g. State.aspx displays states and City.aspx displays cities.
If that is nothing like what you are asking then please ignore!
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
thanks for your promotional support.
Now i got some thing and done it for the same requirment is that
In master page i createed delegate and an event
Public Delegate Sub A(ByVal S As String)
Public Event C As A
Public Sub Search_Click(ByVal r As String)
RaiseEvent C(r)
End Sub
I've raised an event while at the button click of user control
Protected Sub btnGenerate_Click(ByVal sender As Object, ByVal e As System.EventArgs)
RaiseEvent C("txtToFind")
End Sub
In my client page i've handled the master page event with one method
AddHandler Master.C, AddressOf Me.Click
Public Sub Click(ByVal pSearch As String)
'code to execute
End Sub
but its not capturing the Click method.
|
|
|
|
|
Hello every1,
I am reading a book in order to build up my ASP.NET skills. I create a big project and then split it up into 3 category.
<br />
they way of split it.<br />
Add each of the three projects by right-clicking the solution name (i.e., Solution ‘SportsStore’) in<br />
Solution Explorer, and then choosing Add New Project.<br />
i have done some code in 1st project and in second project I need to add one of class's og 1st project.
I try to use using .... but I can't find the first project.
|
|
|
|
|
Hello,
You can add the dll of first project to the second project as a reference and then you can use using statement to use the methods of first project in second project.
Following is the procedure:
1. Select and Expand second project (say Project2)
2. Right click on References and choose "Add Reference"
3. Browse for the first project dll which would be in 'Bin\Debug\' folder of the first Project (Project1)
4. Select the dll and Click "OK".
5. Now you can use using statement in the second project to use the methods of Project1.
Let me know if I did not answer your question correctly.
Thank you,
Raheem MA
|
|
|
|
|
firstly,m thanks for your reply. your solution works very well but there is a problem.
In one of my project(SportsStore.Domain) I have created 3 folder, including different classes. after adding the dll in second project I type using statement. I just saw 2 folders and couldn't see all folders.
using SportsStore.Domain.Folder1
using SportsStore.Domain.Folder2
I can't see other folders and if I type it I will face with compiler error.
|
|
|
|
|
Referencing the DLL is not the best way forward, you're going to want a project level reference which is the far right tab on the add new reference dialog.
|
|
|
|
|
thx for your help guys. i solve the problem.
it wasn't public
|
|
|
|
|
I have two projects:
1) MyProject1
2) MyProject2
Directory Structure
MyProject1
-Images
---BaseControl
------img1.gif
------img2.gif
------img3.gif
-Css
---BaseControl
------StyleSheet.css
-Controls
---BaseControl.cs - derived from CompositeControl
---Derived1.cs - derived from BaseControl
---Derived11.cs - derived from BaseControl
---Derived12.cs - derived from BaseControl
MyProject2
-Controls
---Derived4.cs - derived from BaseControl
Assembly.cs for MyProject1
NOTE: Image is set as an embedded resource
[assembly: WebResource("MyProjects1.Images.BaseControl.gif", "img/gif")]
To get the link to the WebResource, I do the following:
<br />
myImgControl.ImageUrl = this.GetImageUrl("MyProject1.Images.BaseControl.gif");<br />
This works fine with Derived1, Derived11 and Derived12 controls since the embedded resource is available to their parent. However, Derived4 control cannot find the images because the 'MyProject1.Images.BaseControl.gif' is not part of its embedded resource.
Let me know if you need anymore info.
Thanks.
modified on Wednesday, August 11, 2010 6:43 PM
|
|
|
|
|
I am running windows server 2003 and sharepoint inside a virutal PC. I am able to access the Windows server and Sharepoint with no problem. However, how could i access the local websites/sharepoint over the internet.
e.g: I am able to access things running inside the virutal pc. But how could i access the virtual pc from it's parent machine or from the machine which is running the virtual PC
Thanks
|
|
|
|
|
hi
I'm using HttpContext cache for saving data for all application life time
the problem is that randomly the the cache is got empty
I founded that the user is in more than one appdomain during running
so maybe this is the reason that the cahce is suddenly empty and suddenly is not
but how I prevent it?
almog
|
|
|
|
|
In my experience I think that using the HttpContext cache to store data is not so smart; As The user progresses through your webapplication, The HttpContext changes everytime, because every response to the serve is a new HttpContext. so, eventually in time, the server will run it's garbagecollector through the 'old' data (which you want to use). So my suggestion is you create a public static class, which will hold all of your important variables. This way, your 'memory' will be this class that lasts the entire lifetime of the running thread. If you need any examples, please ask. I will be happy to help.
Hope this helps.
"My personality is not represented by my hometown."
|
|
|
|
|
why did i encountered this Error "Directory Listening denied" when i refer to spicial page in web?
what does it mean?
follow that message we see this:
This Virtual Directory does not allow contents to be listed.
modified on Thursday, August 12, 2010 2:54 AM
|
|
|
|
|
|
Avoid 'Repost' as well as 'Crosspost' from next time. It is considered rude.
Pick one forum based on the question and stick to it.
|
|
|
|
|
Hello Friends,
We have the following issue, please help us in getting rid of it.
Scenario:
We have an aspx page which contains two button controls. On click event of first button, generating excel sheet and prompting the user with the open/save dialog box.
Requirement:
Once the excel file generated and open/save dialog prompts to the user, the main window (which has two button controls) should be closed.
We are using the following code to return generated excel file:
Response.Clear();
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
string excelReportName = "MpmCostDataTemplate";
Response.AddHeader("Content-Disposition", "attachment; filename=" + excelReportName + ".xlsx");
..........................
and using the following statement to close the main aspx page window
Page.ClientScript.RegisterStartupScript(this.GetType(), "myCloseScript", "window.close();", true);
Issue is:
The above close statement is working fine if we remove the Response related code (that returns the excel file to the user). But its not working when we have Response related code in place.
Please let us know how can we get rid of this issue when we use Response kind of code.
Thank you,
Raheem MA
|
|
|
|