|
jagadeeshkumar2106 wrote: ChangeDateFormat(ByVal tDate2Format As String) As String
In this function it is mandatory , to have the date format in mm/dd/yyyy in the function paraanthesis , otherwise convert it into mm/dd/yyyy and further format it in any pattern .
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
hi Pankaj Garg will u tell the method to covert the string date which is in dd/mm/yyyy format to mm/dd/yyyy format
|
|
|
|
|
Sorry , i don't know any predefined function for the conversion.
So far i did it using the split method.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
wil u help how to convert this 25/01/2008 to 01/25/2008 using the split method sir
|
|
|
|
|
string str = a.Text.Trim().ToString().Split('/').GetValue(1).ToString() + "/" + a.Text.Trim().ToString().Split('/').GetValue(0).ToString() + "/" + a.Text.Trim().ToString().Split('/').GetValue(2).ToString();
datetime t;
if(Datetime.tryparse(str , out t))
{
Hope this should solve the problem
}
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Hi,
I'm a newbie and am a little stuck.
I am attempting the "easy" task of adding a contact us user form that sends email directly to my accout.
My cs page looks like this:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
namespace TimePlaces
{
public partial class Contact : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void txtSubmit_Click(object sender, EventArgs e)
{
MailMessage Mail = new MailMessage();
MailAddress ma = new MailAddress(txtEmail.Text, txtName.Text);
Mail.From = ma;
Mail.To.Add("info@timeplaces.com");
Mail.Subject = txtSubject.Text;
Mail.Body = txtBody.Text;
try
{
SmtpClient smtpMailobj = new SmtpClient();
smtpMailobj.Host = "localhost";
smtpMailobj.Send(Mail);
Response.Write("Your email has been sent successfully");
}
catch (Exception ex)
{
Response.Write("Message Delivery Fails");
}
}
}
}
The error I receive when I build then start w/out debugging is:
Compiler Error Message: CS0117: 'ASP.contact_aspx' does not contain a definition for 'txtSubmit_Click'
Can anyone help?
Thanks in advance.
TTG
|
|
|
|
|
go to ur source file , and check the click event into the tag , of that control , whether it is matchng or not.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
hi
freind
u use code bihind namespace TimePlaces
so u write
in
html page
Inherits="TimePlaces.contact"
and then try
but i not confirm
no knowledge in .net
|
|
|
|
|
<membership userIsOnlineTimeWindow="1">
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add connectionStringName="SIMSys_ConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
I posted a question regarding changing the password to u people.Actually the pbm arise in web.config file.The error is no such membership provider.The membership provider in webconfig is attached with this mail.please check it and tell what is the problem.its urgent sir..so i ask tou .there is no other error.
|
|
|
|
|
|
Hi,
Any idea on how to create a simple internal site search so user can find information in my web site? I try Index Service but the result appear to be unfriendly. My web pages (ASPX) dont have any meta tag.
Please help.
Thx.
|
|
|
|
|
Hope this link will help u.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
well it seems it working with HTML files only. How about ASPX files. I try to modify the filter from HTML to ASPX. But it return to be no title and no description.
please help.
Thx.
|
|
|
|
|
|
I have a web page where I need to diplay some data that is retrieved tbough an ObjectDataSource. Behind the scense ObjectDataSource is populated through a SQL server stored procedure ( let's say GetData() ). This stored procedure returns around 10K rows and depending upon some criteria I need to dipaly this data in three different Grid view controls. My questions is
1. How can I split data in one recordset that can be used in these three grid views.
2. Is there any better way of doing it rahter than using objectDataSource.
Any specific links and example code will be highly appreciated.
TIA
|
|
|
|
|
imak wrote: 1. How can I split data in one recordset that can be used in these three grid views.
How do you want to split the data? By a specific number of rows? You could add some paging logic to your stored procedure to do this. If each grid view displays different types of data, you would need to write separate stored procedures.
imak wrote: 2. Is there any better way of doing it rahter than using objectDataSource.
The ObjectDataSource control allows data-bound controls to bind to custom objects/collections of custom objects. If you just want to bind a control to the results of a SQL Server query, use the SqlDataSource control.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
* As paul said you can implement paging logic so, that the Ods is not heavy.
* why are you complecating the things? why don't you use 3 ods for 3 grid views
-Ram.
|
|
|
|
|
Thanks Paul and Ram for your responses. I actually gave a simplified version of the actual problem. Let me provide detail so hopefully it will provide some clarification. There are actually 30 different web pages and number of grid ( and varios other controls) vary on each page (depending upon page, number of controls vary between 20 - 40). I am using objectDataSource as this product has multiple flavors that provides ability to connect to various types of data sources(SQL Server, oracle, mySQL etc).
Now in order to populate all controls on one page I was trying to avoid going back and forth between database. That's why I do not want to bind individual controls with so many ods; rather return all possible rows in one stored procedure, Call this stored procedure to fetch all data and then on client side populate different controls by splitting data. Is this a reasonable design? If so, is it possible to split data within objectdatasource logic? If so, can you provide any code examples?
|
|
|
|
|
So I'm writing a web app that surveys users. A checklist basically. I'm planning on accessing a database to get the questions and haven't decided on how to present the data to the user.
I was thinking about using an ActiveX control written in C# but can't quite figure out how to pass session/login data to the control from the server without exposing the information to the client.
Since there doesn't really seem to be much support out there for C# ActiveX controls, does anyone have any alternative solutions that would avoid using postbacks?
|
|
|
|
|
Why activeX? Have you considered one of the AJAX frameworks to eliminate your need for postbacks?
|
|
|
|
|
Why ActiveX? Mostly laxiness to stay in something I'm familiar with (C#) and avoiding learning something new.
I suppose the time has come to familiarize myself with AJAX and all its goodness.
Thanks for the reply.
|
|
|
|
|
Can anyone point me to an article that explains how a web server process an sql statement in c# page and sends it to sql server and then back
thanks!!!
|
|
|
|
|
The web server doesn't really process the SQL at all. Are you looking for a simple data access article? I'd suggest looking at the quickstarts on www.asp.net.
|
|
|
|
|
Webserver won't process SQL statements. It would be send to the database server as packets and database server will execute it.
|
|
|
|
|
Ah yes i think i muddled up my words yday!!
thanks for the info though
if anyone does have some articles about how a web server interacts with a sql server that would be great
cheers
|
|
|
|