|
Use convert(varchar(10), 'YOUR DATE COLUMN', 14) in the SP/SQL that populates the grid.
SG
|
|
|
|
|
Thanks for your help but I didn't understand, what is SP/SQL and where to find it, please give me more details
yasso
|
|
|
|
|
those are store proc and SQL query language...you can look for more info from SQL book online
<< >>
|
|
|
|
|
Could any one help me on how to send email in asp.net?
How do i test this on a Local Area Network? I was thinking of using outlook express but i do not know how to configure this on a LAN
t.aransiola
|
|
|
|
|
I'm not sure I can answer all your query...but try as much as posible..
aransiola wrote: Could any one help me on how to send email in asp.net?
using System.Web.Mail namespace...
aransiola wrote: How do i test this on a Local Area Network? I was thinking of using outlook express but i do not know how to configure this on a LAN
- install an email server
- How to Set Up Outlook Express
Hope those can help you
<< >>
|
|
|
|
|
Hi,
First Install SMTP server in your local machine.
using System.Net.Mail;<br />
<br />
static string HostName = System.Net.Dns.GetHostName();<br />
<br />
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();<br />
message.To.Add("test@mail.com");<br />
message.Subject = "This is the Subject line";<br />
message.From = new System.Net.Mail.MailAddress("test@mail.com");<br />
message.Body = "This is the message body";<br />
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(HostName);<br />
smtp.Send(message);
Regards,
Sandeep Kumar.V
|
|
|
|
|
How do i test the sending and receiving of the mail on my LAN
t.aransiola
|
|
|
|
|
Anybody to help me with a asp.net datepicker control. The one i got from this forum(DatePicker), is requesting for licence after deployment on my intranet(LOcal Area Network). Pls
help
t.aransiola
|
|
|
|
|
which one? the best is that asking the author....
<< >>
|
|
|
|
|
Use JavaScript for this. You will get n number of scripts for Date Picker on net...
|
|
|
|
|
I have a gridview that is not bound to a database source. I used a middletier written by self to return a dataset(with 1 datatable) which i now bind the datatable to the gridview.
The problem is that, i want the gridview to have Edit and update option to edit the gridview row and update.
t.aransiola
|
|
|
|
|
Hi aransiola,
You should set 'AutogenerateEditButton' Property of grid view to true.
Then you should handle RowEditing and RowUpdating Events.
Inside RowEditing Method You should specify which row is going to be edit.
Inside RowUpdating Method You should call your update function for that row.
Try this..
Sherin Iranimose
|
|
|
|
|
Thank u.
Pls one of my field in the gridview is a date field, I want to use a datepicker control in one of teh column instead of a textbox control when editing the grid
|
|
|
|
|
You need to add an 'Edit Item Template' inside the grid view.
For that
2.Inside 'edit item template' put ur datepicker control(whatever it is).
<asp:TemplateField>
<EditItemTemplate>
<asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
</EditItemTemplate>
</asp:TemplateField>
Sherin Iranimose
|
|
|
|
|
Thank you for your response on this problem. Please my
Row_Updating not updating old value with new value. Remember i am using a datatable returned from my middle tier as the datasource to the gridview. If i was using the sqldatasource, i would not have this problem, but the problem im solving requires that i should use a datatable. One user will create the detail table while the other user will use the information from the first user, then update that with his own and save it into another table. Sorry for labouiring you people with this details.
See my code below
Protected Sub grdPhases_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles grdPhases.RowUpdating
If Not Session("biddetail") Is Nothing Then
oDT = Session("biddetail")
End If
grdPhases.DataSource = oDT
If e.NewValues("PhaseCost") IsNot Nothing Then
e.NewValues("PhaseCost") = Decimal.Parse(e.NewValues("PhaseCost").ToString(), Globalization.NumberStyles.Currency)
Else
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
End If
If e.NewValues("StartDate") IsNot Nothing Then
lblPhaseCost.Visible = False
Else
lblPhaseCost.Text = "Enter the Start Date for this phase"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
End If
If e.NewValues("EndDate") IsNot Nothing Then
lblPhaseCost.Visible = False
Else
lblPhaseCost.Text = "Enter the End Date for this phase"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
End If
If Not IsDate(e.NewValues("StartDate")) Then
lblPhaseCost.Text = "Invalid Start Date"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
Else
lblPhaseCost.Visible = False
End If
If Not IsDate(e.NewValues("EndDate")) Then
lblPhaseCost.Text = "Invalid End Date"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
Else
lblPhaseCost.Visible = False
End If
'Dim strFind As String = "PhaseCode='" & e.OldValues("PhaseCode") & "'"
'Dim RowFound() As DataRow = oDT.Select(strFind)
'For j As Integer = 0 To RowFound.GetUpperBound(0)
'only 1 row
e.OldValues.Item("Description") = e.NewValues.Item("Description")
e.OldValues.Item("StartDate") = e.NewValues.Item("StartDate")
e.OldValues.Item("EndDate") = e.NewValues.Item("EndDate")
e.OldValues.Item("PhaseCost") = e.NewValues.Item("PhaseCost")
'Next
Session("biddetail") = oDT
'Set EditIndex=-1 to exit editing mode and rebind teh gridview to the
'datasourecto refersh
grdPhases.DataSource = oDT
grdPhases.EditIndex = -1
End Sub
t.aransiola
|
|
|
|
|
Hey
I am creating a site which allows users to customise their own area (no it is not a myspace clone - it isnt even social networking based).
I was just wondering if any one with experience could help me with my problem:
When creating the themed pages do I:
a) Dynamically create new pages for each user when they sign up
b) Dynamically create pages when a user requests to see the themed area
c) Both these ideas are complete twoddle and there is a better way of doing things (please expand and dont just say your an idiot Dan)
Thanks
Dan
|
|
|
|
|
Its ok I wasnt looking hard enough - ASP.NET supports themes - for any one else stuck on this:
http://msdn2.microsoft.com/en-us/library/tx35bd89.aspx
Dan
|
|
|
|
|
hii...suddenly i am facing a peculiar situation...
when i try to create a new project...i get the foll message...
i am using .net 1.1
The web server reported the following error when attempting to create or open the Web Project located at the Following URL:http://localhost/Webapplication1’.HTTP/1.1 500 Internal Server Error’
Ahsan
|
|
|
|
|
I dunno the root cause of the problem, but I have a quick solution.
Delete the ASPNET user account and then run aspnet_regiis with the -i switch.
SG
|
|
|
|
|
HI
Re install the IIS. I think this problem is from IIs only. This is as per my knowledge.
Thank you
Suresh.R
|
|
|
|
|
Hey,
I have a Grid view with four bound columns and one bound button column. When the bound button column is pressed I want to catch it and trigger some code. The code that I want to trigger requires the unique id of the column which I also display using the first bound column. Now I know I could put the id column in a template column and use findcontrol() to get its value but I was hoping I could just leave it as is.
I am using the RowCommand event to catch the press of the button. Does any one know the simplest and best way to do this. I have attempted to use datakeys but they dont seem to work in the right way.
Thanks
|
|
|
|
|
Use a Template column, place a normal button, set the CommandArgument to the databound filed name using following syntax <%#Eval("COL_NAME")%>. In the row command of the gridview get the command argument value from the event argument.
Regards,
Prakash Kalakoti
|
|
|
|
|
Thanks for that. But is there no way to grab a boundcolumns values instead. So I dont have to use the template column?
|
|
|
|
|
i am creating an instance for the Word.Application Class in my page to open the word document and save it as html. But the following error occurs
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Need Help
Shaki
|
|
|
|
|
I have only had a quick look at your error but i remember this being an access denied error code (or a kind of catch all code) but have a look at this article
http://support.microsoft.com/kb/278013
I hope it helps
Dan
|
|
|
|