ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Validate TextBox inside UserControl using JavaScript in ASP.Net<p>Hi,</p> <div class="post-text"> <p>I am using a usercontrol which has two textboxes named txtUserName,txtPassword and a button&nbsp; named btnSubmit.I am using this usercontrol in my webpage.I want to show alert message in the webpage if the user didnot enter the username or password .&nbsp;&nbsp; </p> <p>How can i achieve this?</p> <p>Thanks</p> </div> <p>&nbsp;</p>, 10 Apr 2013 00:03:40 GMTValidate Session set after login and redirect user back to login page if it is NULL in ASP.Net<p>Hi</p> <p>I have made a web page in which there is login screen when user login it goes next page</p> <p>but my problem is if i directly enter the url of that page it open</p> <p>i want it should not open unless the user log in</p> <p>&nbsp;</p>, 26 Apr 2013 00:24:05 GMTValidate Money Currency format in ASP.Net TextBox using Validators<p>dear fellas,&nbsp;</p> <p>im trying to dcreate a requiredfieldvalidator that only accept amount of money.&nbsp;</p> <p>first i used this expresvalidator as it cant receive any letter.</p> <p>&nbsp;</p> <pre class="brush: vb">&lt;asp:RegularExpressionValidator ID=&#34;rvcheckno&#34; runat=&#34;server&#34; ErrorMessage=&#34;Amount receive numbers only!&#34; ControlToValidate=&#34;tbamount&#34; InitialValue=&#34;0&#34; ValidationGroup=&#34;number&#34;&gt; &lt;/asp:RegularExpressionValidator&gt;</pre> <p>but then it also cant receive cent.</p> <p>i was trying to do something that can accept <span style="text-decoration: underline;"><strong>130.00</strong></span></p> <p>tq</p>, 08 Jan 2014 08:50:21 GMTUsing Class Library inside UserControl in ASP.Net C#<p>Hi all,<br /> I have a query. In my Solution i have Test.DL &amp; Test.Web.UI.</p> <p>Under Test.DL i have Ddlfile.cs in this file i have a class "Fruit"<br /> under Test.Web.UI i have Fruits.ascx file.</p> <p>Can i call fruit class from Test.DL to Fruits.ascx file?&nbsp;<br /> How should i achieve??<br /> Please help me<br /> Thanks in advance</p>, 10 Jan 2018 22:51:05 GMTUser Login Form in Bootstrap Modal Popup in ASP.Net<p>Hi Mudassar</p> <p>refer to this link guide me to this in modal popup</p> <p><a href=""></a></p>, 25 Dec 2017 12:24:03 GMTUser Email Activation link returning back to registration page in ASP.Net<p>When i click activation link in my mail, instead of redirecting to useractivation.aspx it goes back to registration.aspx page again, please why? and it also doesnt clear the useractivation table</p> <p>but the question i want to ask from this example is this below code on same registration page?</p> <p><a href=""></a></p> <p>is this code on a different page or same registration page</p> <p>here is the code</p> <pre class="brush: csharp">private void SendActivationEmail(int userId) { &nbsp;&nbsp;&nbsp; string constr = ConfigurationManager.ConnectionStrings[&#34;constr&#34;].ConnectionString; &nbsp;&nbsp;&nbsp; string activationCode = Guid.NewGuid().ToString(); &nbsp;&nbsp;&nbsp; using (SqlConnection con = new SqlConnection(constr)) &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (SqlCommand cmd = new SqlCommand(&#34;INSERT INTO UserActivation VALUES(@UserId, @ActivationCode)&#34;)) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (SqlDataAdapter sda = new SqlDataAdapter()) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.CommandType = CommandType.Text; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.Parameters.AddWithValue(&#34;@UserId&#34;, userId); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.Parameters.AddWithValue(&#34;@ActivationCode&#34;, activationCode); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.Connection = con; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con.Open(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.ExecuteNonQuery(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con.Close(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; using (MailMessage mm = new MailMessage(&#34;;, txtEmail.Text)) &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mm.Subject = &#34;Account Activation&#34;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string body = &#34;Hello &#34; + txtUsername.Text.Trim() + &#34;,&#34;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; body += &#34;&lt;br /&gt;&lt;br /&gt;Please click the following link to activate your account&#34;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; body += &#34;&lt;br /&gt;&lt;a href = &#39;&#34; + Request.Url.AbsoluteUri.Replace(&#34;CS.aspx&#34;, &#34;CS_Activation.aspx?ActivationCode=&#34; + activationCode) + &#34;&#39;&gt;Click here to activate your account.&lt;/a&gt;&#34;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; body += &#34;&lt;br /&gt;&lt;br /&gt;Thanks&#34;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mm.Body = body; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mm.IsBodyHtml = true; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SmtpClient smtp = new SmtpClient(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtp.Host = &#34;;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtp.EnableSsl = true; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NetworkCredential NetworkCred = new NetworkCredential(&#34;;, &#34;&lt;password&gt;&#34;); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtp.UseDefaultCredentials = true; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtp.Credentials = NetworkCred; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtp.Port = 587; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; smtp.Send(mm); &nbsp;&nbsp;&nbsp; } }</pre> <p>table for user activation code</p> <pre class="brush: sql">CREATE TABLE [dbo].[UserActivation]( [ID] [int] IDENTITY(1,1) NOT NULL, [UserId] [int] NULL, [ActivationCode] [uniqueidentifier] NULL, CONSTRAINT [PK_UserActivation] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO </pre>, 07 Jun 2018 19:49:01 GMTUser adccms already has more than max_user_connections active connections<h2><em>Hello sir,</em></h2> <p><em>i am geting this error when an product add or edit from the siteadmin.</em></p> <p><em>this error show on public sidealso.</em></p> <h2>&nbsp;</h2> <h2><em>User adccms already has more than 'max_user_connections' active connections</em></h2>, 25 Feb 2015 03:21:23 GMTUploading audio file based on the user specified ID.<p>I want to upload audio file based on the ID which i choose</p> <p>For ex: I have three ID's in drop downlist, say</p> <p>ID #1: 1001</p> <p>ID #2: 1002</p> <p>ID #3: 1003</p> <p>I want to upload audio file for 1001. Later, On the same id i may upload another file also.&nbsp;</p> <p>Then, If i choose 1001, the list of files that has been uploaded on 1001 sholud be displayed with download option in Gridview.</p> <p>For SQL SERVER 2008.&nbsp;</p> <p>Kindly help me. Thanks in advance.</p>, 25 Apr 2016 01:47:50 GMTUpload Image and display on User Profile page in ASP.Net<p>Hi all,</p> <p>I am making a Human resource Management system in which i have to make &nbsp;employee profiles, there is a page in which i am entering employee name and uploading a rofile picture and i want the next page to show that image on a left corner of every employee...after clicking on the submit button of the previous page please help !!!</p>, 08 Jan 2014 03:21:41 GMTUpdate Login status for particular user after browser close in ASP.Net<p>Hello Everyone,</p> <p>I want to update my user table column 'loginStatus' to 0 for logout or 1 for fresh login, to prevent multiple logins!</p> <p>So, i wrote update code in logout button click event but the problem is when i close browser or browser tab the loginStatus column will be 1 only, hence it'll not allow me to login again.</p> <p>Please help me...&nbsp;</p>, 10 Apr 2017 00:55:14 GMTTrigger one UserControl event from another UserControl event<p>Hi</p> <p>I have page having two user controls. Now I have a requirement for which i have to trigger one user control event from another user control.</p> <p>If this is possible then please guide me in this regard</p> <p>Regards</p> <p>TanzeelurRehman</p>, 14 Feb 2013 03:36:35 GMTSwitching users from HTTP to HTTPS after login<p>Hi</p> <p>I have a following requirment. In my website, any user login with his/her credentials at that time URL should be switched to HTTPS from HTTP till the user logged out. After Log Out, URL change to HTTP from HTTPS.</p> <p>I am storing username in Session and from that I can check whether user is logged in or not but how to change URL at that time.</p> <p>Kindly help.</p>, 13 Sep 2012 08:10:44 GMTSimple User Comments Form using Database in ASP.Net<p>Hello everyone,</p> <p>i was owndering if you happen to have a simple Comments form syntax with CSS, so that &nbsp;a person can leave his/her name, e-mail, subject and comments. the form that can write under the question when Reply is pressed by the person.</p> <p>example:&nbsp;</p> <p>Question<br />&nbsp; &nbsp; &nbsp; &nbsp;Reply</p> <p><span style="font-size: 9pt;">thank you.&nbsp;</span></p> <p>&nbsp;</p>, 18 Nov 2013 06:34:03 GMTShow Session Expire Timeout Countdown to users in ASP.Net<p>Hi friends,</p> <p>&nbsp;&nbsp;&nbsp; I need to show how to show countdownwhen the user session expire? if users session expire means i need to redirct user to login page..</p> <p>&nbsp;&nbsp; How can i achieve this?</p>, 17 Dec 2012 01:38:14 GMTShow Hide specific section of page based on User Type or Role in ASP.Net<p>I have LOGIN PANEL for student, and I want to disable it in different page. And only the admin can enable and disable it. I dont know the logic behind here. Thanks~</p>, 24 Nov 2014 01:31:09 GMTSend email with a webform link through a WebService in ASP.Net using C# and VB.Net<p>Hi,<br />I need to send data like emp id and device id with a webform link through a condition of webservice.asmx</p>, 22 Mar 2018 05:02:23 GMTSend email to user when clicks Forgot Password button in ASP.Net<p>when user click forgot password it asked user name and email and send his password on his email.</p> <p>How implement this task in with datbase sql server.</p> <p>reply me please ...</p> <p>provide me live demo or source code</p> <p>&nbsp;</p>, 06 Feb 2013 08:04:22 GMTSend Approval email to user after Registration with Activation Link in ASP.Net<p>I asked my questions for three times and it couldn't send me the approval email???&nbsp;</p>, 02 Aug 2016 02:28:43 GMTSelect Item in JavaScript when ImageButton is clicked in Datalist control in<p>Hi,</p> <p>I am using a datalist which contain image buttons. I want to know to selecte item in datalist in javascript. Please help me.</p> <p>Thanks in advance.</p>, 25 Apr 2012 00:16:16 GMTShow hide Label based on user status using C# in ASP.Net<p>if user account in database is true how do i show lable on page member</p> <p>&nbsp;</p> <pre class="brush: csharp"> public DataTable GetProfile(string username) { SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[&#34;DB_A000E6_FIRSTAPP001&#34;].ConnectionString); SqlDataAdapter adp = new SqlDataAdapter(&#34;GetUserPOSTS&#34;, conn); adp.SelectCommand.CommandType = CommandType.StoredProcedure; // adp.SelectCommand.Parameters.AddWithValue(&#34;@Email&#34;, username); adp.SelectCommand.Parameters.AddWithValue(&#34;@UserName&#34;, username); adp.SelectCommand.Parameters.AddWithValue(&#34;@Id&#34;, Id); DataTable dt = new DataTable(); // adp.Fill(dt); return dt;</pre> <p>sql</p> <p>&nbsp;</p> <pre class="brush: sql">CREATE TABLE [dbo].[User3]( [UserId] [int] IDENTITY(1,1) NOT NULL, [UserName] [nvarchar](200) NULL, [Name] [nvarchar](500) NOT NULL, [Email] [nvarchar](500) NULL, [Password] [nvarchar](500) NOT NULL, [Profession] [nvarchar](500) NULL, [AccountCategory] [nvarchar](200) NULL, [Gender] [nvarchar](500) NULL, [MaritalStatus] [nvarchar](500) NULL, [BirthDay] [date] NULL, [State] [nvarchar](500) NULL, [Country] [nvarchar](500) NULL, [ImageName] [nvarchar](505) NULL, [ImageBanner] [nvarchar](505) NULL, [RegisterdDate] [date] NULL, [UserStatus] [bit] NULL, [LastLogin] [datetime] NULL, CONSTRAINT [PK_User3] PRIMARY KEY CLUSTERED ( [UserId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[User3] ADD CONSTRAINT [DF_User3_RegisterdDate] DEFAULT (getdate()) FOR [RegisterdDate] GO ALTER TABLE [dbo].[User3] ADD CONSTRAINT [DF_User3_LastLogin] DEFAULT (getdate()) FOR [LastLogin] GO </pre> <p>&nbsp;</p>, 02 Nov 2016 01:55:01 GMT