Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 19th, 2006, 03:00 AM
Registered User
Join Date: Dec 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error while running javascript code in ASP.NET Pag

I m trying to run a client side code written in javascript to display a calender, which displays selected date in a html textbox control in asp.net web page. Now i wanna use that date in my query to fetch records from database on html button control click but it is giving error "Error on Page".

If i m using an asp button control then it wants "runat= server" on form tag, but if specifying that then javascript could not able to find that form to display calender.

Please help me if anyone can its urgent.Thanx in advance

Old December 19th, 2006, 09:07 AM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

In your code behind do this:

button.attributes.add("onClick", "[javascript function]")

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
Old December 20th, 2006, 03:39 AM
Registered User
Join Date: Dec 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Hi dparson
Thanx for reply
But actlly u r not getting wat i wanna do.
In my project i m using a javascript file through which two calenders r displayed successfully on my page n selected date is displayed on textboxes "firstinput" and "secondinput" .Now i wanna use that value in my query and on button click i m writing the code specified below:
"Dim cn As New OleDb.OleDbConnection
        cn.ConnectionString = ConfigurationSettings.AppSettings("Accesscon").ToS tring + Server.MapPath("contactus.mdb")
        Dim cmd As New OleDb.OleDbCommand
        Dim str As String
        'str = " select Sno from contact where date between ( #" & firstinput.Value & " #) and ( # " & secondinput.Value & " # )"
        'Session("string") = str
The button is a html control and it is giving error "Error on Page" and sometimes it is giving error "_dopostback(onclick('Button',''))"
now pleeez tell me wat to do.

Similar Threads
Thread Thread Starter Forum Replies Last Post
who help me?(asp.net 2.0 running error) fuyingwei ASP.NET 2.0 Basics 2 October 8th, 2008 11:27 AM
Error code: Chapter 17 Pag 576 luisxvarg BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 October 15th, 2007 08:06 PM
Running a Javascript form in ASP.NET:problem Nostromo77 ASP.NET 2.0 Basics 2 February 5th, 2007 09:01 PM
"Server not running ASP.NET 1.1" error message arashj General .NET 1 September 7th, 2004 05:49 AM
ASP.Net: Running 1.1 but getting an error from 1.0 andrewba ASP.NET 1.0 and 1.1 Basics 3 August 9th, 2004 04:05 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.