|
use SCOPE_IDENTITY()
here is more on the subject
http://aspnet.4guysfromrolla.com/articles/062905-1.aspx
|
|
|
|
|
Hi everyone,
i am using one RAD datepicker control in one of the step of asp:wizard control.
My problem is that when i am running the page with step where i have put RAD control ,it works fine, but as i am running the previous step and then if i move on to next step ,one javascript error is fired saying "RAD Datepicker control is undefined".
although other RAD control like DateInput control is working in both the situation.
my asp:wizard control is on .ascx User control.
Any solutions ?
Amit Champaneri
|
|
|
|
|
hi
guys i am implementing the customized http handler for a particular page, there are some controls on that page ,when the request for that particular page is made then that particular http handler is invoked but the controls on that page are not visible, this also happens the same if there is no code in process request method of httphandler class, can any one let me know wht's the problem,thankx in advance.
|
|
|
|
|
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> </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
|
|
|
|
|
Use the "Ignore HTML" option when you are posting HTML code.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Can someone tell me how to put one page in frame from
event in another frame.
There is a frameset on the page with 2 frames (top
bottom) I have a paging done in top frame and when i click
on that link some aspx page should be displayed in bottom
frame.
Any suggestions on how it can be done?
Thanks and Regards
Anu
I am using Outlook express to read all the mails in the inbox.How can i know the connecting url of my outlook express.
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Hi,
You are using two frames... suppose one's name is frame1 and another is frame2.... then in the frame1 you take a link and use target=frame2 as a link attribute. Then the result display at frame2.
|
|
|
|
|
i use .net 2005,when i drag and drop 1 item, and add event into it, i cant see any code of design and delegate of it, but in .net 2003 i easy to find it, any body can help ?
|
|
|
|
|
While we connected server application with all the clients if any of the client was disconnected with the server application how can we identify the disconnected client. The details of disconnected client must be saved in eigther xml or in database.
Prashant
|
|
|
|
|
How are you connecting the clients to the server?
---
b { font-weight: normal; }
|
|
|
|
|
Everytime that a client login, you must to write the coduser inside a database table called users_connect for example, and create a proccess who read the table every minute for example.
already know whos connect, when the client disconnect you write a time stamp asocciated to the coduser inside the datebase table.
keep Learning and you never will be out of date...
|
|
|
|
|
hi guys! i´m getting crazy about a form with no checkall function,instead u have to check one box at a time.
Question: is there a way to create a code so that everytime this form loads it automatically checks all its checkboxes (note: this forms loads from its server and is in a.s.p) so i can´t change its code coz i´m an end user not the admin.
please excuse me if i told any nonsenese coz i know almost nothing about programming.
tks in advance.
|
|
|
|
|
Not unless you create your own browser.
---
b { font-weight: normal; }
|
|
|
|
|
If the page dont have the implementation you cant do it.
keep Learning and you never will be out of date...
|
|
|
|
|
Having trouble trying to figure out how to center a login control. The docs say that <div align=center> is deprecated. So trying to center it with css style attributes. It will work in ie6, but not in FireFox. Can anyone offer a css centering scheme that will work here???
=====================================================
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body style="text-align:center">
<form id="form1" runat="server">
<table border="1" cellpadding="0" cellspacing="0" >
<tr>
<td style="width:600px;text-align:center">
<h1>
Website Headline</h1>
<div style="margin auto;width:550px;background-color:Bisque">
<asp:Login ID="login1" runat="server" BorderWidth="1px" Width="300px" TextLayout="TextOnTop" ></asp:Login>
</div>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
</tr>
<tr>
<td style="text-align:left">
More Content would go here
</td>
</tr>
</table>
</form>
</body>
</html>
=====================================================
|
|
|
|
|
You can use
....
it works on firefox.
enjoy.
|
|
|
|
|
Yes, I could use <center> (just as I could use <div align=center>, but the docs say that both of those are deprecated. I'm searching for a ccs solution.
Thanks anyway...
|
|
|
|
|
Have you tried a width of 100%?
|
|
|
|
|
|
I read some [semi] constant values from a file at application start
-- File: global.asax.cs --
<br />
protected void Application_Start(Object sender, EventArgs e)<br />
{<br />
Application.Set(Name1, value1);<br />
}<br />
<br />
static public string Name1<br />
{<br />
get { return "NAME1"; }<br />
}<br />
Later, when I need to access the value1, I can do something like:
<br />
literal1.Text = Application[VSDonation.Global.Name1].ToString();<br />
This is all working properly. However, I need to modify the value stored as Application["NAME1"] from an administrative page. I'm having much trouble getting this work. Any pointers or ideas?
Thanks.
--G
|
|
|
|
|
just an idea... can you take in the value and store it in a non-static variable, then store that in another application variable? You are dealing with a static variable after all.
Nila
|
|
|
|
|
My problem is modifying/accessing the Application variable from anything other than the Global class.
|
|
|
|
|
Glenn E. Lanier II wrote: I need to modify the value stored as Application["NAME1"] from an administrative page. I'm having much trouble getting this work.
What kind of trouble?
There should be no problem at all to modify the value. The code is exaclty as when you initally set the value.
---
b { font-weight: normal; }
|
|
|
|
|
If I create a class to write the value (so it can be used once when the application starts up and again when the administrator changes this value), I get:
The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)
in reference to Application.Set(VSDonation.Global.Name1, sValue);
|
|
|
|
|
Use HttpContext.Current.Application to reference the application object.
---
b { font-weight: normal; }
|
|
|
|