|
Ok, you can set the Name for mail address. That will display whatever name you provide with the adderess.
MailAddress from = new MailAddress("admin@mydomain.com", "donotreply@[mydomainhere].com");
|
|
|
|
|
Hi Abijit,
I tried your logic by sending a sample email to my email address[gamil]. But no use.
The display name appears in 'from' but it also shows the 'userName' when we click on 'show deails' link.
When i open my mail from inbox. It displays the from as 'donotreply@[mydomainhere].com'. But when i click on 'show details' link it displays like below.
"donotreply@[mydomainhere].com" <admin@mydomain.com>
I don't want show 'UserName' in Recipient user. Because its a credential.
Any solution?
Regards,
kv sekhar
|
|
|
|
|
I'm trying to use OpenOffice 3.1 for Opening the Office Word template as well as modifying it dynamically with Database fields information at the time of opening the document from my harddisk srored loction.
I'm successfully opening and writing into document in my development machine but after deployed to production server(OS Windows 2003 and II6.0) hanging at uno.util.Bootstrap.bootstrap() line.
Dim objDocument As Object
Dim FileNameSource As String = "C:\SysReports\FaceSheet.doc"
Dim localContext As XComponentContext
localContext = uno.util.Bootstrap.bootstrap() //Hanging at this Line
Dim objServiceManager As unoidl.com.sun.star.lang.XMultiServiceFactory
objServiceManager = CType(localContext.getServiceManager(), XMultiServiceFactory)
Plz help to sove this
|
|
|
|
|
Hi i'm a noob, can anyone tell how to host a web page developed in asp? On googling i found out i have to configure IIS. But what if I have a web space like some gmail or google web host space(in labs)...
|
|
|
|
|
Gmail is not a hosting environment, it's an email platform. You need a hosting provider that supports ASP. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
nonono i 'm talking abt web hosting ... i think i saw in google labs.. will refer and will come back to.. wait..
|
|
|
|
|
Two test pages.
Test 1: Test1.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test1.aspx.vb" Inherits="Test1" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>Test 1 - With codebehind.</p>
<p><asp:Literal runat="server" ID="Output" /></p>
</div>
</form>
</body>
</html> Test1.aspx.vb
Partial Class Test1
Inherits MyCompany.Web.BasePage
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
Output.Text = MyUser.UserName
End Sub
End Class
----------------------
Test 2: Test2.aspx
<%@ Page Language="VB" Inherits="MyCompany.Web.BasePage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
Output.Text = MyUser.UserName
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>Test 2 - With inline.</p>
<p><asp:Literal runat="server" ID="Output" /></p>
</div>
</form>
</body>
</html>
----------------------
Both pages inherit from a custom class, MyCompany.Web.BasePage , which itself is based on System.Web.UI.Page . The property MyUser is defined in BasePage and contains data about the user accessing the page.
Both pages work just fine when accessed. The difference is when editing the pages: with Test1, MyUser shows up in IntelliSense, I can access the object's properties and everything works exactly as I would expect. With Test2, the use of MyUser is flagged as a "not declared" error, and IntelliSense does not detect any properties on the object.
What is so frustrating is that on my previous development machine, Test2 worked as desired in the IDE. It is only now, after my primary machine had to be replaced (damned hard drive) that this problem has cropped up. Replacing inline code with codebehind is not feasable, as there are hundreds of pages that would have to be rewritten, not to mention overhead from doubling the number of files.
I have no idea why the two different coding styles should suddenly be acting differently. Is there an option checkbox that needs to be marked? Please, help me out!
|
|
|
|
|
IMO you should be using inline script anyway. It is a better design and implementation to separate the presentation from the logic. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Hi
I have a class which is derived from WebPartZone class. As follows.
LeanWebPartZone : Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone
In this class, I want to set the helpVerb for providing unique helpPage URL for that webpart. Now, on one webpage I have multiple webparts and each webpart might have different helpPage URL. So, my problem is that, at any given time in LeanWebPartZone class, how do I know for which WebPart I am setting the HelpVerb?
Please advise. Thanks
PankajFollow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
It is the responsibility of the WebPart, not the WebPartZone. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Hi
I have a user control, which contains 3 panels, which of course lose their scroll positions on post back of the page.
From my own investigation, I know I need to apply some javascript through the onload method of the body tag, and I want to use hidden fields to save the scrollbar positions. However, I am already using this method on a different user control for a different purpose.
Therefore, I have a few questions, which I need help with:
1) How do I pass in the names of the 3 panels on postback?
2) Get scroll positions of those 3 panels, save it the hidden fields, get it back and apply back to the scroll bars?
3) Apply another javascript function to onload method of the body tag in addition to the one that is already there?
Can anyone help?
|
|
|
|
|
If it is only scroll position you are interested in, try putting
MaintainScrollPositionOnPostback="true"
in your @Page directive.
|
|
|
|
|
This will not work as it only applies to the browser scrollbar
|
|
|
|
|
Hi..
My .aspx page has an unordered list. I need to disable few items (< li >). Here are the two approaches that I tried. Both working in IE. None works in Firefox. Please help!
Apporach 1:
============
The
runs at server and the < li >s are dynamically created in the code behind. I declare a variable li as htmlGenericControl and assign the required attributes and add this li to the list. Before adding the li to the list, I used
li.disabled = true;
Approach 2:
===============
In javascript onpageload,
document.getElementById("li1").disabled = true;
both are not working in FF. please help.
Kit.
|
|
|
|
|
hello guyz appreciate all your effort at codeproject. please take a look at my new website.
but i got the error bellow:
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>Tunsten
|
|
|
|
|
and?? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Try this
Customer errors can be handled be turned off but I prefer them to be turned on as below.
<customErrors mode="Off" />
Or
<customErrors defaultRedirect="ErrorPage.aspx" mode="On">
<error statusCode="500" redirect="servererror.aspx" />
<error statusCode="404" redirect="filenotfound.aspx" />
<error statusCode="403" redirect="AccessDenied.aspx" />
</customErrors>
|
|
|
|
|
Thank you Rana.
I have fixed the error with your suggestions.
I will give you update...
Thanks.Tunsten
|
|
|
|
|
Hi,
I have an web based application. The content for the Home page has been currently mentioned in the HTML code for the Home page using <table>, <tr> and <td> tags. To change the content anytime in future, it needs to be changed in the HTML code.
Is there a way that we can pick up the content from some external place and get it reflected through the website. This ways, any change if required can be made at the external location without referring to the application's code.
Please advise if there is any solution for it.
Thanks.
|
|
|
|
|
how about reading from an XML file?
|
|
|
|
|
Our site is quite slow when user logs inn ? and the speed is pretty good when browsing without logging inn ?
So is there any tool that i can use to test or how to figure out what is causing this ?
Thank you
Andyyy
|
|
|
|
|
You can install one FireFox Addin "YSlow" to have a quick look. Also check Code of login, that database call or other stuff may create performance issue.
|
|
|
|
|
Are you storing huge data in session or viewstate once user logs in? You can also check sql profiler if there is any database related bottlenecks.
There is no foolish question, there is no final answer...
|
|
|
|