Click here to Skip to main content
15,908,775 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: TextBox problem Pin
Kissy1616-Nov-06 22:20
Kissy1616-Nov-06 22:20 
GeneralRe: TextBox problem Pin
Pavan Naidu16-Nov-06 22:33
Pavan Naidu16-Nov-06 22:33 
GeneralRe: TextBox problem Pin
AmitChampaneri16-Nov-06 23:06
AmitChampaneri16-Nov-06 23:06 
Questionhow to get the last inserted Id With SQL Server Pin
Amit Agarrwal16-Nov-06 20:29
Amit Agarrwal16-Nov-06 20:29 
AnswerRe: how to get the last inserted Id With SQL Server Pin
danidanidani16-Nov-06 20:58
danidanidani16-Nov-06 20:58 
QuestionRAD Datepicker control: javascript error. Pin
AmitChampaneri16-Nov-06 20:03
AmitChampaneri16-Nov-06 20:03 
Questionproblem with http handlers Pin
King Shez16-Nov-06 19:54
King Shez16-Nov-06 19:54 
Questionproblem with the control [modified] Pin
monuSaini16-Nov-06 19:52
monuSaini16-Nov-06 19:52 
hello every One,

i m using an control in my webForm.aspx page it is working fine in mozila but not working in Internet Explorer. Following code i m using:


control code :
--------------------------
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="testControl.ascx.vb" Inherits="my.testControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<P>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator"
ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="TextBox1" ValidationExpression="^([a-zA-Z0-9_ ,]{1,120})$"></asp:RegularExpressionValidator></P>
<P>
<asp:TextBox id="TextBox2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="RequiredFieldValidator"
ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator id="RegularExpressionValidator2" runat="server" ErrorMessage="RegularExpressionValidator"
ControlToValidate="TextBox2" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></P>
<P>&nbsp;</P>
<P>
<asp:Button id="submit" runat="server" Text="Button"></asp:Button></P>



-------------------------------------------------------------------------------


this is my aspx page where control is called:


<%@ Page %>
<%@ Register TagPrefix="My" TagName="Test" Src="~\allControls\testControl.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Application</title>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Language" content="English">
<meta name="Distribution" content="Global">
<meta name="Robots" content="All">
<link href=styles.css rel=stylesheet type=text/css>
</head>
<body
<form runat=server>
<my:test id="myTest" runat="server"></my:test>
</form>
</body>
</html>

------------------------------------------------------------------------

this is the click event of the sumit(button)


Private Sub submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submit.Click
If Page.IsValid Then
Dim strConn As String = Application("dbStrConn")
Dim MyConn_member As New SqlConnection(strConn)
MyConn_member.Open()
'transaction
Dim MyTrans As SqlTransaction = MyConn_member.BeginTransaction
Try
'Specify the first statement to run...
Dim MySql_member As String = "insert into test ([name],[email])values(@name,@email)"
'Create the SqlCommand object, specifying the transaction through
Dim cmd_member As New SqlCommand(MySql_member, MyConn_member, MyTrans)
cmd_member.Parameters.Add(New SqlParameter("@name", TextBox1.Text))
cmd_member.Parameters.Add(New SqlParameter("@email", TextBox2.Text))
cmd_member.ExecuteNonQuery()
MyTrans.Commit()
Catch ex As Exception
'Something went wrong, so rollback the transaction
MyTrans.Rollback()
MyConn_member.Close()
Throw 'Bubble up the exception
Finally
'Finally, close the connection
MyConn_member.Close()
End Try
End If
End Sub


this click event is working in mozila but not working in Internet Explorer.

thanx



-- modified at 3:30 Friday 17th November, 2006

rahul saini
GeneralRe: problem with the control Pin
Guffa16-Nov-06 21:06
Guffa16-Nov-06 21:06 
QuestionFrames in .NET Pin
anu8116-Nov-06 19:47
anu8116-Nov-06 19:47 
AnswerRe: Frames in .NET Pin
Pavan Naidu16-Nov-06 22:27
Pavan Naidu16-Nov-06 22:27 
Questionfind inital function in .net 2005 ? Pin
trannguyen8616-Nov-06 19:23
trannguyen8616-Nov-06 19:23 
QuestionHow to know client is disconnected through ASP.net ? Pin
Prashant C16-Nov-06 16:56
Prashant C16-Nov-06 16:56 
GeneralRe: How to know client is disconnected through ASP.net ? Pin
Guffa16-Nov-06 19:23
Guffa16-Nov-06 19:23 
AnswerRe: How to know client is disconnected through ASP.net ? Pin
Britney S. Morales17-Nov-06 1:47
Britney S. Morales17-Nov-06 1:47 
Questioncheckall Pin
paolo silva16-Nov-06 13:43
paolo silva16-Nov-06 13:43 
AnswerRe: checkall Pin
Guffa16-Nov-06 14:57
Guffa16-Nov-06 14:57 
AnswerRe: checkall Pin
Britney S. Morales17-Nov-06 1:49
Britney S. Morales17-Nov-06 1:49 
QuestionLogin Control Centering Pin
wgcampbell16-Nov-06 11:20
wgcampbell16-Nov-06 11:20 
AnswerRe: Login Control Centering Pin
Tal Kain16-Nov-06 14:50
Tal Kain16-Nov-06 14:50 
GeneralRe: Login Control Centering Pin
wgcampbell16-Nov-06 16:56
wgcampbell16-Nov-06 16:56 
AnswerRe: Login Control Centering Pin
ednrgc17-Nov-06 2:35
ednrgc17-Nov-06 2:35 
GeneralRe: Login Control Centering Pin
wgcampbell17-Nov-06 4:27
wgcampbell17-Nov-06 4:27 
QuestionHow to modify Application level variable Pin
Glenn E. Lanier II16-Nov-06 8:32
Glenn E. Lanier II16-Nov-06 8:32 
AnswerRe: How to modify Application level variable Pin
Grapes-R-Fun16-Nov-06 9:06
Grapes-R-Fun16-Nov-06 9:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.