|
|
The CreateUserWizard is nice to use
and saves lots of hassles,
but problem is that when I register a user on my site,
it can't send through the confirmation email.
gmail returns the error message that it needs the connection to be SSL.
below is an extract from http://www.codeproject.com/useritems/SendMailUsingGmailAccount.asp
...
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
...
but my send mail is not in a method,
how do i make the createUserWizard connect to the smtp with SSL activated?
Thank you
|
|
|
|
|
You can create a handler for the SendingMail event of the CreateUserWizard control, and provide your code to send the email in the way you want, you then have to cancel the event.
|
|
|
|
|
oicic,
never thought of that,
will try that
thanks a lot
|
|
|
|
|
Hi there!
I'm using a bound dropdownlist as a column in a gridview and using it's Control parameter in an update query.
//Here the GridView
<asp:GridView ID="GridView1" runat="server" DataKeyNames="price_id"
DataSourceID="SqlDataSource1" AutoGenerateColumns="false"
AutoGenerateEditButton="true">
<Columns>
<asp:BoundField HeaderText="Room" DataField="room_number" />
<asp:BoundField HeaderText="Price ID" DataField="price_id"
ReadOnly="true" />
<asp:BoundField HeaderText="State" DataField="state" />
<asp:TemplateField HeaderText="RoomType">
<EditItemTemplate>
<asp:DropDownList ID="DropDownList1"
DataSourceID="SqlDataSource2" DataTextField="room_type"
DataValueField="price_id" SelectedValue='<%#Bind("price_id")%>'
runat="server">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="MySQL Connection String" ProviderName="System.Data.Odbc"
SelectCommand="SELECT room_number, price_id, state, expiry_date_if_occupied, comments FROM rooms;"
UpdateCommand="UPDATE rooms SET room_number=?, price_id=?, state=?, expiry_date_if_occupied=?, comments=? WHERE room_number=old_?;" OldValuesParameterFormatString="old_{0}">
<UpdateParameters>
<asp:Parameter Name="room_number" />
<asp:ControlParameter Name="price_id" ControlID="DropDownList1"
PropertyName="SelectedValue" />
<asp:Parameter Name="state" />
<asp:Parameter Name="comments" />
<asp:Parameter Name="room_number" />
</UpdateParameters>
</asp:SqlDataSource>
Problem 1
When I run, and try updating I get this exception: "Could not find control 'DropDownList1' in ControlParameter 'price_id'."
Please help me out with what's wrong with the code.
Problem 2
Note: The second BoundField column (Price_ID) binds to the same field as The DropDownList in the TemplateField.
Because of this, I would like to show the DropDownList only when in Edit mode. i.e The BoundField would be for Readonly mode and the DropDownlist for Edit mode.
Problem 3
Am I using the correct OldValuesParameterFormatString with the placeholder? NB: room_number is the key field
Thanks alot good People!
Live in fragments no longer. Only connect.
|
|
|
|
|
Prolem1:
You need to include the id of parent control of the dropdownlist (the GridView) in the ControlID of the ControlParameter. The UniqueId of the Dropdownlist can give you a hint.
Problem2:
It seems you state what you have done, but what is your problem? Is your problem that you currently have to use 2 columns for one field price_id? If you want to hide the bound field in the Edit mode, you can set the InsertVisible of the field to false . Another option is to use a label control in the ItemTemplate of the current Template field to display this value instead of using the bound field.
Problem3:
It's not correct:
+ .. WHERE room_number=?; ...
+ Use ConflictDetection="CompareAllValues"
+
...
<asp:Parameter Name="old_room_number" />
</UpdateParameters>
|
|
|
|
|
Hi there!
I'm having a problem with formating dates. I've tried to understand MSDN, but I never get it right.
First, I have this:
<asp:GridView ID="GridView1" runat="server"
DataKeyNames="reservation_id"
DataSourceID="SqlDataSource1"
AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Check in Date"
DataField="check_in_date"
DataFormatString="{0:yyyy/mm/dd}" ReadOnly="True" />
</Columns>
</asp:GridView>
I would like to change the format of the date bound to the above column into MySQL's yyyy/mm/dd (which I find a pain in the ***). The GridView displays
this date in MM/dd/yyyy format with the time attached e.g (8/30/2006 12:00:00 AM ->representing 30th August '06). MySQL accepts date as yyyy/mm/dd,
so I need to change the GridView's BoundField format but dont know how to do it.
Please help!
Note that OnRowUpdated event of the GridView, I use e.OldValues to get the date and use it in updating a related record in another table, that's why I need
the date in this format without the time.
Thanks a lot good people.
Live in fragments no longer. Only connect.
|
|
|
|
|
Set the HtmlEncode property in your BoundField to "false" and the date formatting should work.
|
|
|
|
|
I'm using ASP.Net2.0.I've a problem.I am creating a table and inserting data from database.The problem is whenever the data reaches the next page(means when I am trying to print the value of the table) the grid lines are not showing.Could any one help me out of this?U can contact me at avijit.gs@hotmail.com
Avijit Roy
Software Engineer
|
|
|
|
|
To be honest, your post seems to be quite confusing to me.
Avi80 wrote: I am creating a table and inserting data from database
I suppose you have a DataTable and you fill it with data from database... right?
Avi80 wrote: data reaches the next page(means when I am trying to print the value of the table)
This part I don't understand at all. What data reach next page? How do they reach it? What does it mean 'print the value of the table'? Do you mean that user cause a PostBack and then you want to display data? But how?
Avi80 wrote: the grid lines are not showing
Hmm, first time you mentioned grid, I suppose you bind your DataTable to a grid, but how and where. Usually when you bind data, they display in a grid. I can not say why it is not working for you, if you don't show me your code or at least explain me your way you did it.
Avi80 wrote: Could any one help me out of this?
Of course I can, but you have to explain clearly what is your problem.
Best advise I can give you is that if you expect an answer, then people must understand a question.
Maybe it is only me, who doesn't understand, but you can see that there is no answer for your question at all, so problem will be probably somewhere else.
Pilo
|
|
|
|
|
I'm sory that U've probs to understad my problem.The reason for not many answers I think is that people may not have faced such problems.The problem is with the Table Control not Grid Control.I am genarating a report for a company and I'm showing report in a table.The problem is when I'm taking the printout the borders r not showing for the table except in the first page.I think now u can better understand my problem
Avijit Roy
Software Engineer
|
|
|
|
|
Hi Everybody,
I am stuck with a requirement where I have to flag/mark cities' location on a map of the country. The question is how can I store information of position of the cities for the map. should I use x/y coordinaets? Finally, how I then display them accordingly on web page with the country map.
Thanx in advance!
-Puran
puranonnet
|
|
|
|
|
The simplest method wouyuld probably be to hold the extents of the map, then a the lat / long of the places to be marked (or eastings / northings).
If you know the extents, then you should be able to work out the proportional position of the city, and thereby the screen X / Y you need
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi Rich,
Thanks for timely suggestion. It worked.
Thanks again
-Puran
puranonnet
|
|
|
|
|
Hi All,
I need a code for extracting the word file and Excel file in ASP.Net (Web Application) using C#. Plz do me that favour.
Regards,
Sandeep...
Hi, its Sandeep here working in a S/W company as a Quality member, I have also intrest in ASP.Net.
So consider me as a member of this group.
Thanks,
Sandeep...
|
|
|
|
|
sandeepraw wrote: I need a code f
Golden Advices of the Lord Chris[^]
There are a couple of ways you can use to work with the word/excel documents:
+ Use the automation[^]
+ Use the ADO.NET with the excel.
+ Use a third party component.
|
|
|
|
|
First of all the execl and work automation is bad because you have to manage the exe server and its ROT table
But, excel documents can be saved as xml files.
Carlos aguilar has a free c# excel assembly
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
I have searched everywhere for a solution for this.
I have a gridview that is bound to a datatable. The gridview has a footertemplate so i can add new records. The problem I have is when the pageloads the footer is not being displayed when there are no records.
Any help with this would be most appreciated.
|
|
|
|
|
If the datasource is empty, you may use the EmptyDataTemplate to add a new record.
|
|
|
|
|
hi,
I have an asp.net C# application .It contain on text box and one Browser... button.om click of this browser button it open another window and it should explore all the folder in a system.like "FolderBrowser" in windows application.
kamalnath
|
|
|
|
|
for this you have already been answered yesterday. Check this link:
http://www.4guysfromrolla.com/webtech/091201-1.shtml
and don't be impatient(posting the same question multiple time) because whenever somebody will get the free time they will answer your question.
Best Regards,
Apurva Kaushal
|
|
|
|
|
You'll also find that posting many times when you already have an answer does not make people want to help you...
|
|
|
|
|
hi,
Sorry for inconvenience. Still I didn’t get exact solution to my problem.
kamalnath
|
|
|
|
|
Then you might want to consider taking some of the feedback people have given you and re-wording the question...? Continually asking the same thing and hoping for some kind of dawning inspiration amongst the people here is not going to get you too far...
|
|
|
|
|
some times its not possible to give answer exactly wot you looking for but give you the idea and hint to solve your problem and then you have to use you own programming skills to come up with a solution....
sorry if you not getting wot you looking for...
Nav.
|
|
|
|