5,346 Posted Topics

Member Avatar for thuyson

Firstly, populate the datatable/dataset and get the reference of DataView through the property DefaultView of datatable. [code] DataTable dt; .... ... DataView dv=dt.DefaultView; dv.RowFilter="ColumnName1=" + TextBox1.Text; DataGridView1.DataSource=dv; [/code]

Member Avatar for kvprajapati
0
39
Member Avatar for c#n00b

I would suggest to use - HtmlAgilityPack [url]http://htmlagilitypack.codeplex.com/Wikipage[/url]

Member Avatar for kvprajapati
0
233
Member Avatar for g2gayan

[b]>Does any 1 knows how to add a Image button to Visual studio 2008 ?[/b] Add a PictureBox control and handle the mouse events.

Member Avatar for kvprajapati
0
77
Member Avatar for skiabox

[b]>I have a project written in vb.net and I am trying to convert it to c#.[/b] Take a look at [URL="http://www.developerfusion.com/tools/convert/csharp-to-vb/"]code converter[/URL].

Member Avatar for kvprajapati
0
466
Member Avatar for raul15791

VS is not responsible to compile your web-pages/code, pages are compiled automatically by asp.net compiler. ASP.NET 2.0 and later version uses aspnet_compiler.exe to compile your web-pages/code-behind along with code placed in app_code.

Member Avatar for raul15791
0
1K
Member Avatar for penguin22

You have pass a string which contains - dddddddddddddddddddddddddddddddd -or- Groups of 8, 4, 4, 4, and 12 digits with hyphens between the groups. Take a look at - [url]http://msdn.microsoft.com/en-us/library/96ff78dc%28v=VS.90%29.aspx[/url]

Member Avatar for penguin22
0
3K
Member Avatar for avinash_545

[b]>inserting ms paint in vb.net form[/b] You can't insert one application into another but you can invoke them from within your application. [code] System.Diagnostics.Process.Start("mspaint.exe") [/code]

Member Avatar for avinash_545
0
116
Member Avatar for farag

[b]>Read an XML file and store it in SQL data base and modify the data base whenever the XML file modified.[/b] Read this article - [URL="http://msdn.microsoft.com/en-us/library/ms345115%28SQL.90%29.aspx"]SQLXML[/URL].

Member Avatar for farag
0
842
Member Avatar for PierlucSS
Member Avatar for PierlucSS
0
238
Member Avatar for chirup

Two dim-array syntax : Dim varName(upperBound,upperBound) as DataType [code] dim img(3,3) as image for d=0 to 3 img(0,d)=My.Resources.RedPlayer img(1,d)=My.Resources.BluePlayer img(2,d)=My.Resources.GreenPlayer img(3,d)=My.Resources.YellowPlayer next d [/code]

Member Avatar for kvprajapati
0
99
Member Avatar for skybomb0

[b]>A string must be passed as a parameter to HandleCommand; any string will do for now. [/b] Think about backgroundworker.

Member Avatar for skybomb0
0
116
Member Avatar for mfdengine18

Yes, you can. You need to use resx (resource). Take a look at codeproject article - [url]http://www.codeproject.com/KB/cs/dotnetvisualstyles.aspx[/url]

Member Avatar for kvprajapati
0
99
Member Avatar for pooja bhatt
Member Avatar for lukeduke

Take a look at article - [url]http://support.microsoft.com/kb/830065[/url]

Member Avatar for lukeduke
0
225
Member Avatar for Buddhika75

Write a class definition that can publish an event. [code] public delegate void TestMe(string what); public class DBCentral { public event TestMe Inserted; public event TestMe Updated; .... public void AddRec(){ ..... .... // Database stuff // Raise an event if(Inserted!=null) { Inserted("put_your_message_here"); } } } [/code]

Member Avatar for kvprajapati
0
171
Member Avatar for Sinaru

[b]>Can anyone suggest me a framework or a SDK to do that? [/b] [URL="http://blogs.msdn.com/coding4fun/archive/2007/03/06/1815291.aspx"]Microsoft[/URL] finger print reader.

Member Avatar for kvprajapati
0
81
Member Avatar for digitalsindhx

Correction: 1. Change the column name - DateTime to DateTime1 (DateTime is a reserved word) 2. [code] Private Sub BindDataToControls() .... TxtDateTime.DataBindings.Add("text", PurchaseDt, "DateTime1") .... txtAmountBalance.DataBindings.Add("Text", PurchaseDt, "AmountBalance") .... End Sub [/code] 3. [code] Private Sub FetchDataFromDatabase() Try PurchaseConn.ConnectionString = "Provider=Microsoft.jet.oledb.4.0; Data Source=" & Pth & "\tryitagaindata.mdb; User Id=admin; Password=;" …

Member Avatar for samxcui
0
140
Member Avatar for rexyrexin

[b]>so I want to show them in combobox in datagrid.[/b] Use DataGridViewComboBoxColumn column type.

Member Avatar for kvprajapati
0
109
Member Avatar for AparnaBhise

Put your code in Page_load event, [code] void page_load() { if(!IsPostBack) { SqlConnection con = new SqlConnection(connStr); SqlDataAdapter da = new SqlDataAdapter("Select * from Dept_Master", con); DataTable table=new DataTable(); da.Fill(table); GridView1.DataSource = table; GridView1.DataBind(); } } [/code]

Member Avatar for dnanetwork
0
146
Member Avatar for jsan

[b]>how will the above code change when used in a website[/b] No need to change the code if c# language is selected at page directive.

Member Avatar for kvprajapati
0
108
Member Avatar for betabasic
Member Avatar for stryker4526

Look at error description: [QUOTE]a definition for 'ElementAt' and the best extension method overload 'System.Linq.Enumerable.ElementAt<TSource>(System.Collections.Generic.IEnumerable<TSource>, int)' has some invalid arguments7[/QUOTE] You need to set KeyValuePair as a TypeSource, [code] if (stationDictionary.ElementAt<KeyValuePair<Station, int>>(id).Key ==null) Console.WriteLine("There is no element at the given ID."); else if (stationDictionary.ElementAt<KeyValuePair<Station, int>>(insert.StID).Key != null) Console.WriteLine("The ID of …

Member Avatar for stryker4526
0
678
Member Avatar for john_beginner

[b]>but when i press button2 then label1 text become empty ! [/b] Because HTTP is a stateless protocol. No changes/states are recorded at client or server side. When you hit a button (submit), a page and control objects are created with it's initial state. Learn the asp.net state management feature. …

Member Avatar for john_beginner
0
153
Member Avatar for J-P

[b]>Would it be possible to implement some kind of sandbox inside my application to make it run a VB.NET application inside itself? Or is there any simpler way of getting scripting support?[/b] Have a look at these articles : 1. [url]http://weblogs.asp.net/rosherove/pages/DotNetScripting.aspx[/url] 2. [url]http://www.mvps.org/scripting/dotnet/index.htm[/url] 3. [url]http://www.codeproject.com/KB/dotnet/nscript.aspx[/url]

Member Avatar for J-P
0
743
Member Avatar for toadzky

Maybe you are missing columns definitions. [code] <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="auto"></ColumnDefinition> </Grid.ColumnDefinitions> <ListBox Name="list_Sensors" ItemsSource="{Binding}" ...... [/code]

Member Avatar for toadzky
0
405
Member Avatar for techstu

I think you forgot to read attributes. [code] if (reader.HasAttributes) { Console.WriteLine(reader.GetAttribute("Username")); } [/code]

Member Avatar for techstu
0
182
Member Avatar for mohit.choudhary

[b]+=[/b] is an operator (string concatenates). [code] string greet="He"; greet += "llo"; [/code]

Member Avatar for kvprajapati
0
113
Member Avatar for rohitmanhas_12

[b]>When the session timouts out I want to redirect the user to the login page[/b] Create a session key and check it on each request. [code] if(Session["key1"]==null) { Response.Redirect("~/Login.aspx"); } [/code]

Member Avatar for kvprajapati
0
65
Member Avatar for micka10

Take a look at CodeProject article - [url]http://www.codeproject.com/KB/audio-video/cameraviewer.aspx[/url]

Member Avatar for micka10
0
757
Member Avatar for PDB1982

You cannot use [URL="http://msdn.microsoft.com/en-us/library/efwbatax%28VS.80%29.aspx"]Option Strict On [/URL]with late binding.

Member Avatar for PDB1982
0
136
Member Avatar for jellybeannn

Use GridView object but donot add in a controls collection. [code] GridView v = new GridView(); v.DataSource = dt; v.DataBind(); .... v.RenderControl(wrt); [/code]

Member Avatar for kvprajapati
0
99
Member Avatar for C-SHARP

Learn how to write [URL="http://www.w3schools.com/sql/sql_update.asp"]update statement?[/URL]

Member Avatar for kvprajapati
0
141
Member Avatar for makdu

Use [URL="http://stackoverflow.com/questions/289498/running-batch-file-in-background-when-windows-boots-up"]vbs script[/URL] or System.Diagnostics.Process methods to run batch file in invisible mode.

Member Avatar for kvprajapati
0
78
Member Avatar for bhavu4u
Member Avatar for sjn21682
Member Avatar for sjn21682
0
118
Member Avatar for acidking001
Member Avatar for ameyanatu

Select the .mdb file in solution explorer and set [b]Copy To Output Directory=Copy if Newer[/b] file property from the properties window.

Member Avatar for ameyanatu
0
88
Member Avatar for kwazy2010

[b]>Please i need some suggestions on how to develop a web based forum application...am not sure if to use ASP.net or php..[/b] You need to learn or you must have know-how of XHTML, CSS, JavaScript, and Database. [b]>please you could also suggest what IDE to use..[/b] PHP - NetBeans. ASP.NET …

Member Avatar for SheldonC
0
165
Member Avatar for SDS20

Make sure that the method [b]generateControls[/b] must be execute on each time when a page is posted back.

Member Avatar for SDS20
0
129
Member Avatar for Haxorz

You can read value at specific cell using, [code] var1=DataGridView1.Rows(0).Cells(0).Value ... [/code]

Member Avatar for Haxorz
-1
313
Member Avatar for lewashby
Member Avatar for lewashby
0
1K
Member Avatar for lishannx

Error says that the SQL-Server instance is not running or not installed. You can verify the database/server-instance using server-explorer in VS.NET. PS: The name of the instance of sql-Server express database is [b].\SQLEXPRESS[/b].

Member Avatar for kvprajapati
0
178
Member Avatar for 1manik

From the [URL="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx"]MSDN[/URL] documentation - [QUOTE]If you cut and paste a folder with files into a folder being watched, the FileSystemWatcher object reports only the folder as new, but not its contents because they are essentially only renamed. To be notified that the contents of folders have been moved or …

Member Avatar for 1manik
0
155
Member Avatar for sunilChoudhary

You can use - [URL="http://weblogs.asp.net/scottgu/archive/2005/11/08/430005.aspx"]Paypal starter kit.[/URL]

Member Avatar for crazyhorse09
-1
68
Member Avatar for mldardy
Member Avatar for swulm

Learn/Use the Linq - Language Integrated query, [code] Dim Ar As Integer() = {11, 22, 11, 22, 33, 33, 22} Dim totalGroups = Ar.GroupBy(Function(p) p).Count [/code]

Member Avatar for kvprajapati
0
87
Member Avatar for celinehgl

[code] ddl_Invoice.DataSource = inv.GetInvoice ddl_Invoice.DataTextField = "invoiceNo" ddl_Invoice.DataValueField = "invoiceNo" ddl_Invoice.DataBind() ddl_Invoice.Item.Insert(0,new ListItem("***Select ***","0")) [/code]

Member Avatar for kvprajapati
0
172
Member Avatar for GAME

[b]>when I click the inside the textbox the text disappears[/b] Handle the click event of textbox. [b]>when I click outside of the the textbox I want the text to reappear[/b] Handle the click event of parent of textbox.

Member Avatar for Geekitygeek
0
62
Member Avatar for PDB1982

See this, [code] Me.ComboBox1.Items.AddRange(Form2.ComboBox1.Items.Cast(Of Object)().ToArray()) [/code]

Member Avatar for kvprajapati
0
90
Member Avatar for jackkms

Populates the DataTable instance and use defaultView property to filter/search.

Member Avatar for kvprajapati
0
87

The End.