|
This is really easy. If you use the {0} {1} type format, you can use the string format method to build your email from the template. The rest is incredibly easy. Just one caveat, the email classes provided in .NET do not close the files used for attachments, so you need to handle the mail sent event, and in there, call close on all the file handles in the attachments collection. I keep meaning to write an article on all the poorly written MS classes....
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all...
Can u guys help me in how to sort the charecters (Alphabetical sorting)in grid view?
My problem is i took a label and a textbox.As soon as i type in a letter in a text box the names starting with that letter should be displayed in the Gridview from the corresponding table in the back end.....
Plz help me out its top urgent....!!!
Thanks
Regards
Abhishek
|
|
|
|
|
Member 4648491 wrote: Plz help me out its top urgent....!!!
Top urgent ? Not just urgent ? Let me drop everyting...
There are AJAX controls that do this. For it to do what you want 'as soon as i type', AJAX is the only solution.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want a sample code to show a loading page between search page and search result page. But the problem is the code without using ajax and threading. The loading page should be displayed and disabled exactly after the data are loaded into the datagrid in the search result page. Please help me
If you don't understand please refer the following link below and make a hotel search then you can see a loading page.
URL:"http://www.lastminute.com/site/travel/hotels/"
Take a look on this...
Advance Thanks for your help
Gopinath.R
|
|
|
|
|
You have been asking this for days. You have been given your answer. If you can't work it out, then let your client know that you don't have the ability to do this task. There's really nothing more to tell you. The only other option I can see is if you're able to resize or hide an iFrame in javascript. One way or the other, you're going to need to use javascript in order to show a page while another page is loading.
If you look at the source of that page, it looks to me like it's using AJAX and a floating DIV to show the about page.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Adding to CG's post--If you look at "ASP.NET problem design solution" book by Marc Bellinaso, you will find a similar kind of implementation which he has used to send newsletters to millions of user. You can implement the same here too.
|
|
|
|
|
hello frnds,
i am developeing a web site i want to validate a textbox accepting DATE in mmddyyyy format
which validation control should i use ??? and how to validate it ????
thankx in advance
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
A regex validator seems the most likely candidate to me.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use RegularExpression validator
|
|
|
|
|
Thankx Guys...
any example of RegX to validate the date in mmddyyyy format ???
thankx in advance
regards
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
I recommend downloading Expresso, which both will have examples, and will help you learn to build your own
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thankx much
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi all, im having a little problem here
I started using ASP Membership (Default configuration and no Membership section in my web config), as you know, by default it uses the ApplicationName of "/"
I would like to change the ApplicationName to another name
I changed the ApplicationName in Web config and the aspnet_Applications table fields (ApplicationName and LoweredApplicationName)
I am able to log in with userX, however no roles are assigned to the user after log in. UserX has 3 roles assigned and i made sure by checking the aspnet_UsersInRoles
I check the aspnet_roles table and made sure that the ApplicationID is the same as the ApplicationID in aspnet_Applications and it is the same
When using the ASP web app configuration tool i can see that there are 3 users created but 0 roles created, if i add another role (using this tool) it creates it but also creates another Application record with the default name of "/" and asigns the new role to this new ApplicationID
Is there something else that i should change?
Thanks in advance
Alexei Rodriguez
modified on Monday, February 25, 2008 9:10 PM
|
|
|
|
|
Never mind
The problem was that i hadnt specified a RoleManagerProvider in my webconfig, so the default ("/") was being used, i just included this in my webconfig:
<br />
<roleManager enabled="true"><br />
<providers><br />
<remove name="AspNetSqlRoleProvider" /><br />
<add<br />
connectionStringName="LocalSqlServer" <br />
applicationName="AppName"<br />
name="AspNetSqlRoleProvider" <br />
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><br />
</providers><br />
</roleManager><br />
Alexei Rodriguez
modified on Thursday, April 10, 2008 7:16 PM
|
|
|
|
|
Hi All,
I am facing some problem in passing tweo parameters using Eval in GridView.
I tried like this, but there is some javascript error-
<asp:hyperlink id="HyperLink2" runat="server" navigateurl="">]]>'
Text= '<%# Bind("AcceptNumber") %>'>
//the javascript function--
function OpenDialog(rid,AcceptNumber) {
window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ")
}
when i click on hyperlink in GridView, it shows some havascript error.
this error says that the second parameter i passed , is not identified.
can anybody tell me how to pass two parameters in a javascript function using Eval.
Please help me.
|
|
|
|
|
I miss an ; at the end of your :
window.showModalDialog( "PopupAccept.aspx?ReturnList?ReportNumber= "+ rid+ "&AcceptNumber="+ AcceptNumber+ " ',window, 'dialogWidth:800px;pxcenter:yes;help:no;resizable:no;status:no ")
Another way is to fill 2 hidden fields within this page through your JS.
After filling these hidden fields do a __Postback(...... (search for __Postback).
Your page will reload and in your codebehind (.aspx.cs file) you can check if the hiddenfields have a value.
|
|
|
|
|
|
I am trying to write a web application using Visual Web Developer 2008 Express edition that uses Virtual Earth and I'm stuck on how to call a certain function from an asp:button event handler.
I'm using the code-behind structure for my webpage. I have one file, cogenmap.aspx, that contains the html for the webpage, and another file, cogenmap.aspx.vb, that contains the Visual Basic code for the webpage.
in my cogenmap.aspx file I have the button declared as follows:
<asp:Button ID="buttonAddUnit" runat="server" Text="Add Unit" />
and in my cogenmap.aspx.vb file I have the event handler written as follows:
Partial Class CogenMap
Inherits System.Web.UI.Page
Protected Sub buttonAddUnit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles buttonAddUnit.Click
Try
'Dim newCoordinates As New VELatLong(CDec(textLatitude.Text), CDec(textLongitude.Text))
Catch ex As Exception
End Try
End Sub
End Class
textLatitude and textLongitude are asp:textbox components and I can reference them with no problems.
The problem is that it can't find the VELatLong function in this context. In the cogenmap.aspx file the line:
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6"></script>
allows me to use the VELatLong function with no problem from a client side script block in the cogenmap.aspx file. But I don't know how to reference it from the cogenmap.aspx.vb file, using VB code instead of ECMAScript.
How can I control my Virtual Earth map display from other ASP.NET controls I have placed on the page, such as this button?
|
|
|
|
|
rushinge wrote: using VB code instead of ECMAScript.
You should use javascript in your pages so that they run on browsers that are not IE. You cannot call this from the code behind, you need instead to create a normal HTML button that calls a javascript method which does what you want on the client side.
I recommend reading a book on ASP.NET so that you understand the difference between the client and the server, this is why you can't call a client method on the server side, and it's really fundamental to you understanding ASP.NET.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello.
I wrote a simple web service using VS2005.
The web service has one method “Add” that gets 2 numbers and add it.
I tested the web service and it worked fine.
I wrote a simple client that used this web service method. (I used “web reference” to add that web service ).
The client worked OK as well But, when I tried to use it Asynchronous but it didn’t recognize the method “BeginAdd” that should have been created by the WSDL.exe.
What should I do in order to create these functions so I could use the web service Asynchronously with a callback.
Thanks
Shay
p.s.
i'm a beginner with c#
|
|
|
|
|
I have a couple of pages where a client can make edits in content, the client can toggle to whatever page he wants to make changes.
I really don't want to hit the db with updated content till the last minute. How can I keep the content with changes the client makes resident on each web page's respective form, until the last minute when he can update all pages to the db at once?
I thought maybe XML, but I do not know if that is a pig on resources & speed as compared to hitting the db. Someone also mentioned javascript, i.e. something like "parent.frames[0].document.getElementsByName" but I dont know anything about that script.
Anyone have a miser way to keep several pages of multiline "ajax multi line text boxes" that have been edited, "alive" with changes visible as user toggles back and forth the several pages until the last minute where a button will update all the pages at once to the db?
|
|
|
|
|
The obvious way is to make your several pages, controls all on the one page, and navigation just changes which control is visible. Then, all of your changes will remain in viewstate until you save them all to the DB in one go
javascript is hardly going to help, as it runs on the client, not the server. You should understand js if you're using AJAX, at some point you may dig into what your library is doing for you, to work out why it works the way it does.
XML is just a string, but it doesn't really answer the question. XML is a format, but that doesn't explain how you store it, or where.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I understand what you are saying.
But, I know of a website where the pages with forms are in their respective URL folders with last edits shown.
Does this mean that website is absolutely hitting the database everytime the person moves off the page after editing it to another?
|
|
|
|
|
Not necessarily, it could be storing data in the session. But, that's nasty, you should avoid that.
But, it is possible that they are, yes.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I agree. So then, if session objects are not being used, nor cookies or anything client side, are you saying they MUST be doing interim updates?
|
|
|
|