5,346 Posted Topics
Re: Sorry, I'm not following your question too well but you can use [icode]Request.MapPath()[/icode] method to obtains absolute path of given resource name. [code] string path=MapPath("~/file.txt"); [/code] | |
Re: Use ASP.NET server control (HyperLink) [code] <li><a runat="server" href="~/Home.aspx">Home</a></li> <li><a runat="server" href="~/KMApps/KMAppsHome.aspx">Applications</a></li> [/code] | |
Re: First of all you have to create or open a project. Select Project menu + Add New Item + choose Service-based Database. Once you add database in your project you may retrieve server name via Server Explorer (View menu + Server Explorer) | |
Re: >What are advantages/disadvantages of each approach? That's true that there are number of approaches to perform database operations but all these approaches are came form [URL="http://msdn.microsoft.com/en-us/library/27y4ybxw.aspx"]ADO.NET[/URL] core API to [URL="http://msdn.microsoft.com/en-us/library/3y0bb1zd(v=VS.90).aspx"]ease[/URL] database [URL="http://www.codeguru.com/csharp/.net/net_data/datagrid/article.php/c7321__4/"]I/O[/URL]. | |
Re: DataTable class members is the answer. | |
Re: Have a look at [URL="http://stackoverflow.com/questions/44383/reading-email-using-pop3-in-c"]this[/URL] thread. | |
Re: First of all you need to create a pattern of date. [code] SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); ... [/code] | |
Re: I presume that the image field is 1st column in GridView. [code] Dim img As Image = CType(GridView1.Rows(0).Cells(0).Controls(0), Image) if Not IsNothing(img) Then ... do comparison End If [/code] | |
Re: If your application uses database then use auto number field or sequences. | |
Re: You need to invoke Read method. [code] OleDbDataReader recordset = command.ExecuteReader(); if(recordset.Read()) label3.Text = recordset[0].ToString(); [/code] | |
Re: First of all you need to change output parameter type in C# code and mention the length (size). [code] SqlParameter p2 = cmd.Parameters.Add("@PrID", SqlDbType.Varchar,100); [/code] and execute command to read output parameter value. [code] con.Open(); cmd.ExecuteNonQuery(); con.Close(); textBox1.Text = p2.Value.ToString(); [/code] EDIT: Change CommandText property (see @Momerath post) [code] cmd.CommandText … | |
Re: To learn asp.net you must have knowhow of .net framework, CLS compliant language (C#, VB.NET) and html/css/javascript. I'd suggest ASP.NET unleashed, is very good book for beginners. | |
Re: Use DateTime.TryParseExact method, [code] DateTime dt; DateTime.TryParseExact(TextBox1.Text, "yyyy-MM-dd", null, System.Globalization.DateTimeStyles.None, out dt); if (dt == DateTime.MinValue) Label1.Text = "Invalid"; else Label1.Text = "Valid"; [/code] | |
Re: Use hyperlink. [code] <a href="file.pdf">PDF</a> [/code] | |
Re: I'd suggest you to create image [URL="http://msdn.microsoft.com/en-us/library/ms972953.aspx"]handler[/URL] | |
Re: I guess one of the combobox is not selected and variables "row", "row1" or "row2" has nothing (Null). So use IsNothing method to test an object is missing or not. [code] If IsNothing(row) Then //Select 1st combobox value return End If ... If IsNothing(row1) Then //Select 2nd combobox value return … | |
Re: Please post error message or stack trace here. Have a look at line #5, [code] if TextBox1.Text.Length=0 and TextBox2.Text.Length=0 then ... ... 'stop the execution of this method Return End If [/code] And change sql statement, [code] Dim sqlquery As String = "SELECT * FROM `logins` WHERE `username` = '" … | |
Re: Use [URL="http://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx"]BackgroundWorker[/URL] class. | |
Re: >Is possible to load a .NET v3.5 assembly into a .NET v2.0 application? Nope! | |
Re: [URL="http://stackoverflow.com/questions/5583266/is-classic-ado-net-still-used"]Good[/URL] question indeed. That's true that [URL="http://msdn.microsoft.com/en-us/library/aa697427(v=vs.80).aspx"]EDM[/URL]/FE and LINQ to SQL have number of advantages over ADO.NET. In fact Entity Framework is an O/R mapper which is built on top of ADO.NET but lot of old applications still uses ADO.NET & Dataset. | |
Re: [icode]interest[/icode] is not declared. Use [icode]interestRate[/icode]. Have a look at line #22 It must be, [code] interestRate = interestR; [/code] | |
Re: >I'm trying to use a variable as a case condition No! case label must be a [URL="http://msdn.microsoft.com/en-us/library/06tc147t(v=VS.100).aspx"]constant[/URL] value. | |
Re: All DLLs must be stored into [b]Bin[/b] folder. Use [icode]Publish Web Site[/icode] feature of VS IDE to publish web application. | |
Re: Have a look at [URL="http://www.codeproject.com/KB/game/sudokuincsharp.aspx"]codeproject[/URL] article. | |
Re: You need to install MS-SQL server on target machine before running this application. | |
Re: Guys! Read forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Wrap your programming code blocks within [noparse] [code] .... [/code] [/noparse] tags. | |
Re: theighost, Post complete source code. | |
Re: Use the Model-View-ViewModel ([URL="http://msdn.microsoft.com/en-us/magazine/dd419663.aspx"]MVVM[/URL]) Design [URL="http://www.wpftutorial.net/MVVM.html"]Pattern[/URL]. | |
Re: Master page tutorials: 1. [url]http://www.asp.net/master-pages/tutorials[/url] 2. [url]http://msdn.microsoft.com/en-us/library/aa581781.aspx[/url] | |
Re: Use gsub() [code] descrip.gsub!(/\s+/,' ') [/code] | |
Re: Use <img> tags. [code] switch (intTypeID) { case 1: strNewsImage = "<img src='images/news_general.gif' alt='' />"; break; .... } [/code] | |
Re: There are number of links of tutorials/blog posts at [url]http://xunit.codeplex.com/[/url] | |
Re: Have a look at [URL="http://msdn.microsoft.com/en-us/library/ms227881(v=VS.90).aspx"]tutorial[/URL] to create crystal report and [URL="http://www.gotreportviewer.com/"]RDLC[/URL] report. | |
Re: What is field type of [b]ID[/b] and [b]tran_client[/b] columns? ![]() | |
Re: You need to write SQL statement, [code] string sql="select * from tableName where DateColumn=@DateColumn"; [/code] and use [b]IsPostBack[/b] property to show all rows from the first load of page. [code] protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack){ SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); SqlCommand cmd = new SqlCommand("select * from … | |
Re: Take a look at sample. | |
Re: Have a look at code project article - [URL="http://www.codeproject.com/KB/directx/directshowmediaplayer.aspx"]DirectShow MediaPlayer in C#.[/URL] | |
Re: Welcome. [icode]Head First Servlets and JSP[/icode] is a great book. I suggest you buy it. | |
Re: Not knowing exactly what you're trying to achieve. May be you want to use LINQ. [code] Dim a(,) As Integer = {{11, 22}, {24, 34}, {44, 55}} Dim result = From n In a Where n > 20 Select n For Each p In result Console.WriteLine(p) Next [/code] | |
Re: I think you want to get rows from both these tables. Isn't it? | |
Re: You need to get a [icode]MainwindowHandle[/icode] and activate it using P/invoke SetForegroundWindow(). [code] [DllImport("user32.dll")] static extern bool SetForegroundWindow(IntPtr hWnd); private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process proc = (from n in System.Diagnostics.Process.GetProcesses() where n.ProcessName == "cmd" select n).FirstOrDefault(); if (proc == null) { MessageBox.Show("No such a process."); } else … | |
Re: Do not use [icode]ClassName.class[/icode] attribute value of [icode]code[/icode] and [URL="http://download.oracle.com/javase/tutorial/deployment/applet/html.html"]archive[/URL] attribute value should be .jar file. So, you need to create Java Archive (.jar) that contains applet classes and other resources. [code] <applet code="package.ClassName" archive="myresource.jar" width="689" height="456"> ... </applet> [/code] PS: Class viewer$1 is an anonymous inner class which will … | |
Re: Fetch a row from the database using DataReader and use [icode]GetBytes()[/icode] method to retrieve an array of bytes. | |
Re: Please have a look at these articles: 1. [URL="http://msdn.microsoft.com/en-us/library/ms731193.aspx"]Sessions, Instancing, and Concurrency[/URL] 2. [URL="http://msdn.microsoft.com/en-us/magazine/cc163590.aspx"]Discover Mighty Instance Management Techniques For Developing WCF Apps[/URL] | |
Re: Use Linq to XML. [code] string file = @"c:\path\file1.xml"; var result = from n in XDocument.Load(file).Descendants("module") select new { ModuleCode=n.Element("moduleCode").Value, ModuleName=n.Element("moduleName").Value }; foreach (var t in result) { Console.WriteLine(t.ModuleCode + " " + t.ModuleName); } [/code] | |
Re: Try, [code] dataGridView1.CurrentRow.Cells[1].Value.ToString() ; [/code] | |
Re: Try to learn & use AJAX. | |
| |
Re: Use session object instead of query string. |
The End.