I need a javascript which checks that user's mobileno should
start from 9, otherwise it gives error.

Thanks and Regards
Dhruv Shah

Actually i dont know the name of my smtp host. should i write there localhost or my IP address... Please help me out..


Hello everybody there. I am developing an application for peroject
management. Now i require that any new user has to be created
he should send an email to the adminstrator. and then adminstrator will make that person the user of the portal...

So please help me out of this problem...
String from=request.getParameter("txtfrom");
String to="[EMAIL="shahdhruv@cooltoad.com"]shahdhruv@cooltoad.com[/EMAIL]";
SmtpClient client = new SmtpClient("Dhruv/");
PrintStream message = client.startMessage();
message.println("To: " + to);
message.println("Subject: Sending email from JSP!");
message.println("This was sent from a JSP page!");
message.println("Cool beans! :-)");
catch (IOException e){
System.out.println("ERROR SENDING EMAIL:"+e);
if i write this code and execute it then i am getting UnknownhostException....


As I am new to MySQL, I dont know how to connect my jsp page to the MySQL Database.
So please help me by giving some code on how to connect.
I have downloaded driver for Java named as Connector/J.
MySQL version is 5.0.
In this line
con = DriverManager.getConnection("jdbc:mysql://localhost/JSP_MYSQL?user=root&password=admin");

what is wrong where i have to give MySQL username and password and the name of the Database.

So please help me out.

It's Urgent.

Connection con = null;
Statement state = null;
ResultSet rs = null;
con = DriverManager.getConnection("jdbc:mysql://localhost/JSP_MYSQL?user=root&password=admin");
state = con.createStatement();
String s = "Select * from user.login";
rs = state.executeQuery(s);

catch(SQLException e)


Hello Everybody there, I am developing a site in which I require that
once a user login in the site then and then only user is able to click on the aviable links to other pages.

If user has not logged on and tries to click on the links, then only login page should apperared.

How do i do this???
Please help.

Hello Everybody,

I want to know that how we can delete the record from the datagrid only, that data should not be deleted from the database.
i.e., It should not be seen in webpage,but it should remain in the database.

Please help me out soon.My existing code is:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ShowJobs.aspx.vb" Inherits="COMPANY.ShowJobs"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">



Imports System.Data
Imports System.Data.SqlClient
Public Class ShowJobs
Inherits System.Web.UI.Page

Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
End Sub
End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'Put user code to initialize the page here
    If Not IsPostBack Then
        Dim ...

as i m building a job site. i am getting resume for the applicants through,but now i want to send them auto generate mail. i.e; when they send me mail and after i get the mail. my system should automatically send the mail to them that thank you for sending mail. etc to them.

so can this be done in ASP.NET

[quote=web_developer;269678]dude may be the problem coz u didnt add the next line to ur code.

SmtpMail.SmtpServer = "name of ur smtp server and often is localhost"

try that


thank you so much. Now i am able to send mails, but the problem i noticed is that the mail is going to the BULK folder of the person whose email address i am writing in TO field, and also when i specified CC field and a email address then mail goes to the INBOX folder. What is the reason behind this.Plz.
So do you have any solution for this.

hello there i want to send an email in which user has selected an attachment to send. below is the code for it:

Imports[/COLOR][COLOR=#000000] System.Web.Mail[/COLOR]
[COLOR=#0000ff]Public[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]Class[/COLOR][COLOR=#000000] WebForm1[/COLOR]
[COLOR=#0000ff]Inherits[/COLOR] System.Web.UI.Page

[COLOR=#0000ff]Region[/COLOR] " Web Form Designer Generated Code "

[COLOR=#008000]'This call is required by the Web Form Designer.
[/COLOR]<System.Diagnostics.DebuggerStepThrough()> [COLOR=#0000ff]Private[/COLOR] [COLOR=#0000ff]Sub[/COLOR] InitializeComponent()
[COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]Sub
[/COLOR][COLOR=#0000ff]Protected[/COLOR] [COLOR=#0000ff]WithEvents[/COLOR] txtToEmail [COLOR=#0000ff]As[/COLOR] System.Web.UI.WebControls.TextBox
[COLOR=#0000ff]Protected[/COLOR] [COLOR=#0000ff]WithEvents[/COLOR] lbFiles [COLOR=#0000ff]As[/COLOR] System.Web.UI.WebControls.ListBox
[COLOR=#0000ff]Protected[/COLOR] [COLOR=#0000ff]WithEvents[/COLOR] butOK [COLOR=#0000ff]As[/COLOR] System.Web.UI.WebControls.Button
[COLOR=#008000]'NOTE: The following placeholder declaration is required by the Web Form Designer.
[/COLOR][COLOR=#008000]'Do not delete or move it.
[/COLOR][COLOR=#0000ff]Private[/COLOR] designerPlaceholderDeclaration [COLOR=#0000ff]As[/COLOR] System.Object
[COLOR=#0000ff]Private[/COLOR] [COLOR=#0000ff]Sub[/COLOR] Page_Init([COLOR=#0000ff]ByVal[/COLOR] sender [COLOR=#0000ff]As[/COLOR] System.Object, [COLOR=#0000ff]ByVal[/COLOR] e [COLOR=#0000ff]As[/COLOR] System.EventArgs) [COLOR=#0000ff]Handles[/COLOR] [COLOR=#0000ff]MyBase[/COLOR].Init
[COLOR=#008000]'CODEGEN: This method call is required by the Web Form Designer
[/COLOR][COLOR=#008000]'Do not modify it using the code editor.
[COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]Sub
[/COLOR]#[COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]Region
[/COLOR][COLOR=#0000ff]Private[/COLOR] [COLOR=#0000ff]Sub[/COLOR] Page_Load([COLOR=#0000ff]ByVal[/COLOR] sender [COLOR=#0000ff]As[/COLOR] System.Object, [COLOR=#0000ff]ByVal[/COLOR] e [COLOR=#0000ff]As[/COLOR] System.EventArgs) [COLOR=#0000ff]Handles[/COLOR] [COLOR=#0000ff]MyBase[/COLOR].Load
[COLOR=#008000]'Put user code to initialize the page here
[/COLOR][COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]Sub
[/COLOR][COLOR=#0000ff]Private[/COLOR] [COLOR=#0000ff]Sub[/COLOR] butOKClick([COLOR=#0000ff]ByVal[/COLOR] sender [COLOR=#0000ff]As[/COLOR] System.Object, [COLOR=#0000ff]ByVal[/COLOR] e [COLOR=#0000ff]As[/COLOR] System.EventArgs) [COLOR=#0000ff]Handles[/COLOR] butOK.Click
[COLOR=#0000ff]Dim[/COLOR] TheMailMessage [COLOR=#0000ff]As[/COLOR] [COLOR=#0000ff]New[/COLOR] MailMessage
[COLOR=#0000ff]Dim[/COLOR] TheMailConnection [COLOR=#0000ff]As[/COLOR] SmtpMail
[COLOR=#0000ff]Dim[/COLOR] TheAttachment [COLOR=#0000ff]As[/COLOR] MailAttachment
[COLOR=#0000ff]Dim[/COLOR] TheItem [COLOR=#0000ff]As[/COLOR] ListItem
TheMailMessage.From = "shahdhruv47@yahoo.com"
TheMailMessage.To = txtToEmail.Text
TheMailMessage.Subject = "File Request"
TheMailMessage.Body = "Attached is the information "

& "you requested."
[COLOR=#0000ff]For[/COLOR] [COLOR=#0000ff]Each[/COLOR] TheItem [COLOR=#0000ff]In[/COLOR] lbFiles.Items
[COLOR=#0000ff]If[/COLOR] TheItem.Selected = [COLOR=#0000ff]True[/COLOR] [COLOR=#0000ff]Then
[/COLOR]TheAttachment = [COLOR=#0000ff]New[/COLOR] MailAttachment( _
Server.MapPath("/Email/C9/" & TheItem.Value))
[COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]If
[COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]Sub
End[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]Class


and i am getting this error...........

[B]Server Error in '/Email' Application. [/B]

[B][I]The "SendUsing" configuration value is invalid. [/I][/B]

[B]Description: [/B]An ...

Sorry i m new to ASP.NET so could u explain what is CODE tags.
If it is possible for u can u modify the code i have posted such that it works correctly.
Thanks for Replying me.

VB.NET Code behind:
[COLOR=#0000ff]Private[/COLOR][COLOR=#0000ff]Sub[/COLOR][COLOR=#000000] Button1Click([/COLOR][COLOR=#0000ff]ByVal[/COLOR][COLOR=#000000] sender [/COLOR][COLOR=#0000ff]As[/COLOR][COLOR=#000000] System.Object, [/COLOR][COLOR=#0000ff]ByVal[/COLOR][COLOR=#000000] e [/COLOR][COLOR=#0000ff]As[/COLOR][COLOR=#000000] System.EventArgs) [/COLOR][COLOR=#0000ff]Handles[/COLOR][COLOR=#000000] Button1.Click[/COLOR]
[COLOR=#0000ff]Dim[/COLOR] dbconn [COLOR=#0000ff]As[/COLOR] SqlConnection
[COLOR=#0000ff]Dim[/COLOR] dbcommand [COLOR=#0000ff]As[/COLOR] SqlDataAdapter
[COLOR=#0000ff]Dim[/COLOR] dslogin [COLOR=#0000ff]As[/COLOR] [COLOR=#0000ff]New[/COLOR] DataSet
dbconn = [COLOR=#0000ff]New[/COLOR] SqlConnection("Server=localhost;UID=sa;PWD=sa;database=websiteDemo")
dbcommand = [COLOR=#0000ff]New[/COLOR] SqlDataAdapter("Select UserID from "

& "Login Where "
& "Username = '" & TextBox1.Text

& "' and Password = '" & TextBox2.Text _
& "'", dbconn)
dbcommand.Fill(dslogin, "Login")
[COLOR=#0000ff]If[/COLOR] dslogin.Tables("Login").Rows.Count = 0 [COLOR=#0000ff]Then
[/COLOR]Response.Write(dslogin.Tables("Login").Rows.Count = 0)
Label3.Text = "Username and Password Not Found.Please Try Again!"
[/COLOR]Session("UserID") = dslogin.Tables("Login").Rows(0).Item("UserID")
Session("Username") = TextBox1.Text
[COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]If
[/COLOR][COLOR=#0000ff]End[/COLOR] [COLOR=#0000ff]Sub[/code][/COLOR]

[COLOR=#0000ff]i m getting : output as:[/COLOR]

Username and Password Not Found.Please Try Again!"
instead i have that username in the database. Also i m inputting correct Username and Password.

I am developing a SIte. in which i have to build login page...
so can somebody plz help me out....i have to complete within 4 days...
i am using ASP.NET 2003 with VB.NET 2003 as COdeBehind and SQL SERVER 2000 as BAckend...
Please help me...............


i want to know that how to pass parameter in crystal report in asp.net using vb.net 2003
i want to pass parameter through drop down list control
plz help me out
thanks in advance it';s hurrry

[quote=tgreer;254064]You don't. Or, rather, you shouldn't worry about this it all. Pick a standard resolution, such as 800x600, and code for it. Trying to code for all possible screen resolutions and browser window sizes will drive you crazy, and in my opinion it's sticking your nose where it doesn't belong: inside the users' preferences for monitor and window settings.

That said, JavaScript does give a "screen" object which you can interrogate to gather info about resolution. ASP.NET should have that built in to some object or other for you.[/quote]

i am using asp.net 2003 sir can you pls give me some pseudocode for this. my code behind is vb.net 2003

I am developing a web site based on Job Application. Now when i run this site at my client's computer the pages are look much wider.
I have 17 inch Monitor and my client has 15 inch monitor.
So how could i slove this problem regarding the screen resolution.

Please Help me out.

Dim strSQL as String

strSQL = "SELECT Field1, Field2 FROM tbltemp WHERE Field1 = '" & TextBox1.Text & "'"


Hope this helps.[/quote]

thanks sir
this help me out. but when i m printing the record it also shows me textbox and command button. So sir now how do i remove this from print out.

i am developing a job site and i require to search for records from the database. i m passing value fro that parameter in textbox.
so please help me
thanks in advance