5,346 Posted Topics
Re: 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] | |
Re: > 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. | |
Re: Use Apache Commons [URL="http://commons.apache.org/fileupload/"]FileUpload[/URL] API | |
Re: You need to use [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getbytes.aspx"]GetBytes()[/URL] method of DataReader. | |
Re: Use [URL="http://msdn.microsoft.com/en-us/library/x8ybe6s2(v=vs.90).aspx"]DataBindings[/URL]. | |
Re: Use [URL="http://stackoverflow.com/questions/10426/what-is-a-good-windows-hex-editor-viewer"]HexEditor[/URL]. | |
Re: Use [i]Shared[/i] modifier to create an application scope object. [code] public class Test public shared ds as New DataSource End Class [/code] | |
![]() | Re: 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. |
Re: >how can i retrive the source code from the published? Is there any chance? You can't! | |
Re: Use ALTER TABLE statement. | |
Re: Delete a particular row from the datasource and rebind the GridView. | |
| |
Re: 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. | |
Re: Do use [icode]Profile[/icode] page object. [code] Profile.Prefix = txtPrefix.Text; ..... [/code] | |
Re: There are number of ways to work with XML documents. You may choose - DOM, DataSet, Linq XML and Simple Api for XML. | |
Re: Fetch column value and store it into the string. Use Split method of string to convert comma separated string into one dimensional string array. | |
Re: You need to install [icode]crystal report runtime[/icode] package. | |
Re: Dear, zneweb and mail2saion have solved your problem. [CODE] <asp:GridView ID="GridView1" runat="server"> <EmptyDataTemplate> There is no data. </EmptyDataTemplate> </asp:GridView> [/CODE] | |
Re: 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. | |
Re: Use [icode]crystalReportViewer1.RefreshReport()[/icode] method instead of [icode]cr.Refresh()[/icode]. | |
Re: 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] | |
Re: 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(); | |
Re: 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 … | |
Re: 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] | |
Re: >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> <html> >head> >/head> <p>Hello World<p> </html> <script … | |
Re: Have a look at while loop expression. It should be, [code] while (!is_X) [/code] | |
Re: Please read [URL="http://en.wikipedia.org/wiki/Session_management#Web_server_session_management"]this[/URL] article. | |
Re: [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.... … | |
Re: 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. | |
Re: Here is search [URL="http://www.daniweb.com/forums/search13576752.html"]result[/URL]. | |
Re: Handle the [b]Sorting[/b[ event of GridView. | |
Re: Use Int16.TryParse method instead of Convert.ToInt16, For example, [code] Int16.TryParse(txtYardResult.Text, out yardage); [/code] | |
Re: 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] | |
Re: @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 … | |
Re: 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 … | |
Re: So the code should be, [code] FileUpload.SaveAs(Server.MapPath("~/Photo/AllPhotoes/" + lbl1.text)); [/code] | |
Re: >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. | |
Re: >Can I use JSP or ASP to complete this. Whichever in which you are proficient. | |
Re: Drop "AdRotator" into UpdatePanel and (Use Ajax Extension) handle the Timer's event. | |
Re: >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]. | |
Re: @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 ' ' … | |
Re: 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] | |
Re: @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 … | |
Re: >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"? | |
Re: 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 … | |
Re: > 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. | |
Re: @rjbrjb777, you can use System.Data.OleDB provider to connect to the excel and perform read and write on spread sheets. |
The End.