5,346 Posted Topics

Member Avatar for adobe71

Fetch/read a record and write it into response buffer. [code] StringBuilder sb=new StringBuilder(); sb.append("<table>"); ... sb.append("<tr><td>" + value1 + "</td></tr>"); ... sb.append("</table>"); .... Label1.Text=sb.ToString(); [/code]

Member Avatar for aspproject
0
76
Member Avatar for kimlong008
Member Avatar for Nitin Daphale

> but I can't since it is removed already from Datatable. Populate dataTable once (use IsPostBack property) and put it (instance of DataTable) into the Session.

Member Avatar for aspproject
0
92
Member Avatar for 080346

Use Apache Commons [URL="http://commons.apache.org/fileupload/"]FileUpload[/URL] API

Member Avatar for kvprajapati
0
105
Member Avatar for Sarama2030

You need to use [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getbytes.aspx"]GetBytes()[/URL] method of DataReader.

Member Avatar for tomato.pgn
0
119
Member Avatar for ryan311

Use [URL="http://msdn.microsoft.com/en-us/library/x8ybe6s2(v=vs.90).aspx"]DataBindings[/URL].

Member Avatar for Jx_Man
0
169
Member Avatar for rt.garg1991

Use [URL="http://stackoverflow.com/questions/10426/what-is-a-good-windows-hex-editor-viewer"]HexEditor[/URL].

Member Avatar for kvprajapati
0
42
Member Avatar for Shantanu88d

Use [i]Shared[/i] modifier to create an application scope object. [code] public class Test public shared ds as New DataSource End Class [/code]

Member Avatar for crishlay
0
377
Member Avatar for Moirae

Do not save the content of file (image file) into database. Store application relative path of image instead. BTW you can use BLOB (oracle), Image (MS-SQL) field type.

Member Avatar for crishlay
0
72
Member Avatar for fusioninfosys

>how can i retrive the source code from the published? Is there any chance? You can't!

Member Avatar for crishlay
0
106
Member Avatar for waqar100
Member Avatar for eileenc87
Member Avatar for crishlay
0
294
Member Avatar for fawadkhalil
Member Avatar for Dragon840215

If you are working on web-app then use [icode]Session[/icode] and in case if you are developing win-forms application then create [icode]public shared[/icode] string field.

Member Avatar for kvprajapati
0
154
Member Avatar for ctyokley

Do use [icode]Profile[/icode] page object. [code] Profile.Prefix = txtPrefix.Text; ..... [/code]

Member Avatar for ctyokley
0
196
Member Avatar for Shockbox

There are number of ways to work with XML documents. You may choose - DOM, DataSet, Linq XML and Simple Api for XML.

Member Avatar for kvprajapati
0
112
Member Avatar for riyapethe

Fetch column value and store it into the string. Use Split method of string to convert comma separated string into one dimensional string array.

Member Avatar for kvprajapati
0
48
Member Avatar for lukasrzeznik
Member Avatar for kirtee2209
0
177
Member Avatar for Sarah Lee

Dear, zneweb and mail2saion have solved your problem. [CODE] <asp:GridView ID="GridView1" runat="server"> <EmptyDataTemplate> There is no data. </EmptyDataTemplate> </asp:GridView> [/CODE]

Member Avatar for egrullard
1
2K
Member Avatar for ddanbe

Suggestion. Main() method should have [STAThread](http://blogs.msdn.com/b/jfoscoding/archive/2005/04/07/406341.aspx) attribute. Every windows application should always declare the Apartment Thread attribute.

Member Avatar for ddanbe
2
969
Member Avatar for lukasrzeznik

Use [icode]crystalReportViewer1.RefreshReport()[/icode] method instead of [icode]cr.Refresh()[/icode].

Member Avatar for lukasrzeznik
0
141
Member Avatar for shyla

Error says that the class [icode]Rectangle[/icode]haven't no argument constructor (zero parameter). You could instantiate a Rectangle using, [code] Rectangle rect=new Rectangle(10,20); [/code]

Member Avatar for ddanbe
0
200
Member Avatar for Behseini

The connection string you have used in your program is belongs to `System.Data.OleDb` data provider API. You need to use Oracle data provider connection string. string str="Data Source=server_name_or_name_of_machine;Persist Security Info=True;User ID=your_username;Password=your_password;Unicode=True"; OracleConnection con = new OracleConnection(); con.ConnectionString = str; con.Open();

Member Avatar for kvprajapati
0
664
Member Avatar for salmap

Remember one thing : An object variable might have one of the two values : an object reference or null. So before you start working on object variable please check whether an object variable has null or an object reference. Exception (Object Reference Cannot set to an instance of an …

Member Avatar for kvprajapati
0
165
Member Avatar for VilePlecenta

Use Peek() method to check end of of stream. [code] StreamReader sr = new StreamReader(file); char [] ar = new char[1000]; StringBuilder sb = new StringBuilder(); while (sr.Peek() !=-1) { sr.Read(ar, 0, 1000); sb.Append(ar); } string []lines=sb.ToString().Split('\n'); [/code]

Member Avatar for Momerath
0
7K
Member Avatar for low1988

>but it cannot print out the property of the web control.Please give me some help. Not sure about your question but what I understood that you want to print markup (tags) of web-page. You need to encode the html markup. [code] <!DOCTYPE html> &lt;html&gt; &gt;head&gt; &gt;/head&gt; &lt;p&gt;Hello World&lt;p&gt; &lt;/html&gt; <script …

Member Avatar for pinkygirl
0
106
Member Avatar for ndeniche
Member Avatar for computerbear

Have a look at while loop expression. It should be, [code] while (!is_X) [/code]

Member Avatar for abelLazm
0
113
Member Avatar for kieky
Member Avatar for gaurav balyan

Please read [URL="http://en.wikipedia.org/wiki/Session_management#Web_server_session_management"]this[/URL] article.

Member Avatar for Ramesh.KR
0
78
Member Avatar for shameemmMbstu

[QUOTE=shameemmMbstu;862585][B]i have developed a c# project now i have to make it an Exe so that i can install it on any system and run it... the bin which contains the exe only runs in the system which has .net installed and does not executes where there is no .net.... …

Member Avatar for Momerath
0
2K
Member Avatar for ZER09

You need to install the appropriate version of .net framework and MS-SQL server on target machine before deploying your application. However you can [URL="http://msdn.microsoft.com/en-us/library/bb264562(v=sql.90).aspx"]embed MS-SQL express[/URL] into your custom applications.

Member Avatar for bincly
0
170
Member Avatar for roottybrian

Here is search [URL="http://www.daniweb.com/forums/search13576752.html"]result[/URL].

Member Avatar for gever
0
194
Member Avatar for shailaja mohite
Member Avatar for audiemurphy67

Use Int16.TryParse method instead of Convert.ToInt16, For example, [code] Int16.TryParse(txtYardResult.Text, out yardage); [/code]

Member Avatar for audiemurphy67
0
109
Member Avatar for ashley11

Use Dictionary<K,V> instead of Hashtable class. [code] Dictionary<int, string> obj = new Dictionary<int, string>(); obj.Add(101, "foo"); obj.Add(102, "bar"); foreach (KeyValuePair<int, string> entry in obj) Console.WriteLine(entry.Key + " " + entry.Value); [/code]

Member Avatar for kvprajapati
0
57
Member Avatar for patel.ajay82

@patel.ajay82 You need to read [URL="http://java.sun.com/developer/onlineTraining/JavaMail/contents.html"]Authenticator[/URL] paragraph for your reference and here you missed [icode]mail.smtp.host:host[/icode] entry. [code] class MyAuth extends Authenticator { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication("username","password"); } } [/code] [code] public static void main(String[] args) { ...... ...... Properties props = new Properties(); props.put("mail.smtp.host", host); ...... Authenticator …

Member Avatar for kvprajapati
0
3K
Member Avatar for nice_candy

The [b]class[/b] is a keyword and you should have to write in lower letter. [code] class abc { public int sum(int a,out int b){ b = 10; return a+b; } } [/code] Write following statements to invoke sum method. [code] abc obj=new abc(); int no1=10,no2; int result=obj.sum(no1,out no2); ... ...print …

Member Avatar for kvprajapati
0
73
Member Avatar for paresh_thummar

So the code should be, [code] FileUpload.SaveAs(Server.MapPath("~/Photo/AllPhotoes/" + lbl1.text)); [/code]

Member Avatar for kesaven
0
174
Member Avatar for denmarkstan

>Object cannot be cast from DBNull to other types. I guess your program is about to retrieve data. To avoid database null errors you need to compare result with DBNull.Value.

Member Avatar for kvprajapati
0
70
Member Avatar for mubin_attar

>Can I use JSP or ASP to complete this. Whichever in which you are proficient.

Member Avatar for kvprajapati
0
67
Member Avatar for kiran2010

Drop "AdRotator" into UpdatePanel and (Use Ajax Extension) handle the Timer's event.

Member Avatar for riteshbest
0
86
Member Avatar for caitlins5

>This works fine in IE but the address bar shows in Chrome and Firefox and we would like it hidden. This behaviour is by [i]design[/i].

Member Avatar for caitlins5
0
165
Member Avatar for invisal

@invisal I appreciate your effort but I'd like to add my comments on this post. First of all you need to overrides [icode]DefaultSize property[/icode] - DefaultSize represents the size of the control when it is initially created/rendered. [code] Protected Overrides ReadOnly Property DefaultSize() As System.Drawing.Size Get Return MyBase.PreferredSize ' ' …

Member Avatar for kvprajapati
1
1K
Member Avatar for k1robert

Please have a look at MSDN and [URL="http://www.asp.net/data-access/tutorials/creating-a-data-access-layer-cs"]asp.net[/URL] tutorials : [URL="http://msdn.microsoft.com/en-us/library/bb288041.aspx"]Creating Data Access and Business access layer.[/URL]

Member Avatar for k1robert
0
213
Member Avatar for poonamjadav

@poonamjadav There are a lot of tutorials on the internet instructing how to make N-tier applications. Link posted by BestJewSinceJC is a good reference to learn and develop ASP.NET MVC (MVC2) framework. If you have no experience and you want to learn something new then I say give the technology …

Member Avatar for poonamjadav
0
453
Member Avatar for PdotWang

>I am new here. I do not know how to put it in the Code Snippets area. Sorry for showing it twice. @PdotWang Sorry! I'm not getting you. Do you have any problem or you want to make this thread as "Code Snippet"?

Member Avatar for WolfPack
0
3K
Member Avatar for darshini.dayal

Improper SQL statement. [code] cmd.CommandText = "INSERT INTO contactus1(Name,Telephone,Email,Enquiry) values ('" + TextBox4.Text + "','" + TextBox3.Text + "','" + TextBox2.Text + "','" + TextBox1.Text + "')"; [/code] Use Parameters instead of hard-coded sql statement. [code] SqlCommand cmd = new SqlCommand(); cmd.CommandText = "INSERT INTO contactus1 (Name,Telephone,Email,Enquiry) values (@name,@tel,@email,@enq)"; cmd.Connection …

Member Avatar for MamathaS
0
231
Member Avatar for Kath_Fish

> I realize that have one value appear two times... SortedList can't permit duplicate keys. Please verify key values, may be whitespace char(s) on left or right of string. Post/attach datafile and code that read and parse that datafile.

Member Avatar for Momerath
0
182
Member Avatar for rjbrjb777

@rjbrjb777, you can use System.Data.OleDB provider to connect to the excel and perform read and write on spread sheets.

Member Avatar for rjbrjb777
0
194

The End.