90 Posted Topics
Re: Add the namespace for HtmlAnchor ([COLOR="Red"]using System.Web.UI.HtmlControls;[/COLOR]), [CODE] protected void Page_Load(object sender, EventArgs e) { HtmlAnchor htmlanchor = new HtmlAnchor(); htmlanchor.HRef = "#"; htmlanchor.Title = "Welcome"; //tooltip htmlanchor.InnerText = "Welcome"; this.form1.Controls.Add(htmlanchor); } [/CODE] | |
Re: Soecify defaultbutton property in form tag [CODE]<form id="form1" runat="server" defaultbutton="Specify the button ID">[/CODE] | |
Hi All, I'm new to this jquery and i found some article, implemented but its server side method is not firing. Plz if you know help out this probelm. These is the code implemented in my application in jquery side. [CODE]<script type="text/javascript" ></script> <script language="javascript"> $(document).ready(function() { $("#btnClick").click(function() { var … | |
Re: hi if u want to delete row give like this dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index); | |
Re: U mean once u select the name from combobox, should not allow user to select same name in coming rows. is it correct?? | |
Re: check it in table structure, the datetime data s string data type or datetime | |
Re: im not geting clearly. do u want to transfer database data to datagrid or what ur expect... [QUOTE=Devasya;650196]Hi all I just want to know, how to insert the data from a datagrid into access database? please help me.... :'([/QUOTE] | |
Re: [QUOTE=Tank50;703263]Hi guys I want to join two tables and executive the sql statement.I mention what is code i wrote ,Once Complie the code it says Error1 The left-hand side of an assignment must be a variable, property or indexer [CODE]SqlConnection Con3 = new SqlConnection("Data Source=IT;Initial Catalog=Test;Integrated Security=True"); Con3.Open(); string str1 … | |
Hi All, I'm new to Blog concepts.Is it possible to post the comments to website using the webservice instead of directly post the comments in website. Any help can welcome. | |
Re: Modified code,(red color s newly added and green s modified) [CODE] Dim ButtonCount As Integer [COLOR="Red"]Dim XLoc As Integer[/COLOR] OnTheFlyButton.Location = New Point([COLOR="Green"]XLoc[/COLOR], 100) [COLOR="Red"]XLoc += 100[/COLOR] [/CODE] | |
Re: Did you checked encrypt(this) function s present in ur code. | |
Re: Check this in Page_Load event [CODE] if (!IsPostBack) { for (int i = 0; i < 3; i++) { TextBox txt = new TextBox(); txt.ID = "txt" + i.ToString(); //or "txt" + pnlview.Controls.Count.ToString(); pnlview.Wrap = true; pnlview.Controls.Add(txt); pnlview.ScrollBars = ScrollBars.Both; } } [/CODE] | |
Re: U need to add space in pattern and modified code is, [CODE] Match matchMyRegex = Regex.Match(fullNameTextBox.Text, "^[a-zA-z ]*$"); [/CODE] | |
Re: Check this, [URL="http://www.codeproject.com/KB/database/simpledbreadwrite.aspx"]http://www.codeproject.com/KB/database/simpledbreadwrite.aspx[/URL] | |
Re: Might be [COLOR="red"]agent_business_collection.business_pkg_ref [/COLOR]is unique data bcz of this u r getting the garbage total when u r trying do to the sum(agent_business_collection.self_amount),sum(agent_business_commission.self_comm_amt). Try to remove the [COLOR="red"]agent_business_collection.business_pkg_ref [/COLOR] from the select statement. | |
Re: anyway u created the virtual dir, through inetmgr open ur virtual application and browse that. u will the URL and place that url it in desired place instead of '~/Masterpage.master' in other application | |
Re: objFso.CreateTextFile used to create text file because name itself create text file. Use this code [CODE] File.Create(My.Application.Info.DirectoryPath & "\NEWBATCH.BAT") [/CODE] | |
Re: If u invisible the panel1 when user click on checkbox, u cant see the inside panels beacuse inside panels is added into panel1. | |
Re: Getting error because You are trying to assign the command into control text. Try below set of statements and Red color are modified [CODE] 'Make Connection to database Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Atlanet\loantracking\CTS_be.mdb") 'Query information for Branch Number Dim BranchNumber As OleDbCommand = New OleDbCommand("SELECT Branch_Number From MSysUserList WHERE … | |
Re: You have to check in form resize event as per my understanding, [CODE] private void Form1_Resize(object sender, EventArgs e) { txtresize.Width = this.Width - 40; } [/CODE] | |
Re: This are the issues in ur code, 1. where did u specified the connection string value in this red colr var [CODE] Dim daClient As New OleDb.OleDbDataAdapter("SELECT * FROM Client;", [COLOR="red"]connection[/COLOR]) [/CODE] 2.I just modified ur code, [CODE] 'DATASET AND ADAPTER Dim dsC As New dsClient1 Dim daClient As New … | |
Re: Try this, [CODE] dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect dataGridView1.MultiSelect = False [/CODE] | |
Re: Use this and specify the URL properly [CODE] private void RequestResponse() { try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"http://192.168.00.000/Folder/test123.html"); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader sr = new StreamReader(response.GetResponseStream()); string strRead = sr.ReadToEnd(); txtHTMLContent.Text = strRead; sr.Close(); } catch { } } [/CODE] | |
Re: If its that dialog box s usercontrol then u can do this way, Create instance for Usercontrol, using that instance u can get the close button ID. based on that ID assign whatever property u want to assign. | |
Re: Place this below code into button click if you want to check or to textchanged event. [CODE] bool isStrictMatch = false; string patternStrict = @"^([a-zA-Z]+)$"; Regex reStrict = new Regex(patternStrict); if (txtSecond.Text.Trim() != string.Empty) { isStrictMatch = reStrict.IsMatch(txtSecond.Text.Trim()); if (!isStrictMatch) MessageBox.Show("Please use alphabetics", "Validation", MessageBoxButtons.OK); } [/CODE] | |
Re: Before complete the running process dont try to install the next process | |
Re: Either edit the column via table Structure panel, Or run the following SQL query: [CODE] ALTER TABLE 'workers' CHANGE 'id' SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT [/CODE] | |
Re: Just hardcoded the data with single quotes [CODE] lstView.Items.Add("CSharp'"); lstView.Items.Add("Vb'"); [/CODE] Or U can get data from backend and using the loop jus concate the backend data with "'" and add into listbox. | |
Re: Try modified statement what you mentioned in red font [CODE] Bitmap bm = new Bitmap(Width, Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); Rectangle rect = new Rectangle(0, 0, Width, Height); [/CODE] | |
Re: Place below code after the com declaration [CODE] If com.ExecuteNonQuery = 0 Then hasErrors = True End If conn.Close() If Not hasErrors Then txtStatus.Text &= vbCrLf & "Query Successful" & vbCrLf Else txtStatus.Text &= vbCrLf & "You may only update an existing record. " End If [/CODE] | |
Re: If u know how many records want to update, go for loop and update it one by one with condition. | |
Re: Check whether record count is 0 or more than. If its >0 then show ur searh data into second form, else redirect into first form (Search form) with message box | |
Re: In "Clear Filters" button click event write this code to clear the text [CODE]Searchtextbox.Text = String.Empty; //or Searchtextbox.Text = ""; [/CODE] | |
Re: If your store procedure doest have input param specify as [CODE] string selUser = "SELECT LidID FROM leden WHERE LidID=" + userID; //Add input data [/CODE] then remove line from 23 to 25 and check the status | |
Re: The way what your written as wrong [CODE] If ComboBox1.SelectedItem = "sabah" Then [/CODE] So whenever user selects as "sabah" then you are doing some set of statements. Until unless its not going inside to get the any output regarding the Summary. Change your logic and try it. | |
Re: Check this URL will redirect to you to get the correct solution [url]http://www.devasp.net/net/articles/display/706.html[/url] | |
Re: Please look this code after the modification, [B]login.aspx[/B] [CODE]<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %> <!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></title> </head> <body> <form id="form1" runat="server"> <div> <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox> <asp:TextBox ID="txtPassword" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Click"/> </div> </form> </body> </html> [/CODE] … | |
Re: Use this [CODE]SqlConnection myConnection = new SqlConnection("Data Source=IPaddress;Initial Catalog=databasename;Persist Security Info=True;User ID=username;Password=password"); SqlCommand cmd = new SqlCommand("SP name", myConnection); cmd.CommandType = CommandType.StoredProcedure; SqlParameter par = cmd.Parameters.Add("@MESSAGE ", SqlDbType.Varchar); par.Direction = ParameterDirection.ReturnValue; cmd.Parameters.Add("param", SqlDbType.NVarChar, 50).Value = "**"; myConnection.Open(); cmd.ExecuteNonQuery(); string strerrormes=par.Value; [/CODE] [B]Database side[/B] IF @@ERROR <> 0 SET @MESSAGE ='FAILURE' … | |
Re: First time might be u r getting array(0) is 10 digits and when click again the button, arrya(0) holding 9 digits. So when your are trying to use substring(5,5), length is not correct thats what throwing the exception. | |
Re: Might be ur application path and deleting file path is differnt.So specify the full path to delete the file like "c:\program files\....." | |
Re: Can u tel me what is plantid, How to want to show the image with scenario | |
Re: Create Session variable or Hidden control and assign username into session vairable or hidden control when the login is succssfull. Using session variable u can know who is inserting the data or updating | |
Re: Use this, [CODE]SqlConnection myConnection = new SqlConnection("Data Source=IP address;Initial Catalog=Databasename;Persist Security Info=True;User ID=username123;Password=password123");[/CODE] | |
Re: You can fetch data from DB and assign into dataset or datatable. Using the loop u can bind data into dictionary with key, value pair. | |
Re: If u use onserverclick then u will get this error "No overload for method 'temp' takes '0' arguments" Instead of that u can go for server control with onclick. [CODE]<asp:Button ID="btnClick" Text="Click" runat="server" onclick="btnClick_Click" />[/CODE] [B]Codebehind[/B] [CODE]protected void btnClick_Click(object sender, EventArgs e) { }[/CODE] OR If u want html control … | |
Re: Can u post ur stuff what u made so far to help | |
Re: You can use like this, [CODE] string Connectionstring = "...."; sqlConnection con = new sqlConnection(Conncetionstring); try { con .Open(); } catch (SqlException exp) { //assigned into string vari strErrorState = exp.Message; }[/CODE] | |
Hi All, I am having html content in text format and want that to convert as image to send to user instead of Html content to prevent the modification. | |
Re: Use like this and let me know, [CODE]If(Dropdown.selectedvalue=="P") [/CODE] | |
Re: [QUOTE=rosebabu;697922]Can anybody say, how to minimize the window form on close button is clicked in C#? thanks in advance.[/QUOTE] hi u mean, r u created any buton on ur form or r u teling the default close, mini,max button top right corner of form. tel me clearly where u want … |
The End.