5,346 Posted Topics
Re: > Page Load event occurs on Button Click event What is the point here? Page lifecycle events namely - init, load, pre-render etc must be executed when you request page. Please read ASP.NET Page lifecycle posts from MSDN. | |
Re: You can use [Linq to Dataset](http://msdn.microsoft.com/en-us/vstudio/bb738039#selsimp1): Sample: Dim arr() = dt.AsEnumerable().Select(Function(p) Return New String(p("stdname") & "" & p("gender")) End Function).ToArray() System.IO.File.WriteAllLines("c:\csnet\p.txt", arr) | |
Re: The [PlaceHolder](http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.placeholder.aspx) control is used to stores dynamically added server controls on the Web page. | |
Re: JavaScript - code added. [CODE=PHP] <script type="text/javascript"> function doit() { var t; if(renting.discrate[0].checked==false && renting.discrate[1].checked==false) return false; return true; } </script> <div class="formorder"> <form name="renting" method="post" action="p1.htm" onsubmit="return doit()"> <table width="525" height="354"> <tr> <td colspan="3"><div align="center" class="font_style">TRS VIDEO RENTAL SYSTEM - RENTING FORM</div></td> </tr> <tr> <td width="171"> </td> <td colspan="2"> </td> </tr> … | |
Re: Have a look, [code] public class TestIt { static void Main() { WebRequest request = WebRequest.Create("http://www.sample.com/index1.php"); try { using (WebResponse response = request.GetResponse()) { HttpWebResponse httpResponse = (HttpWebResponse)response; Console.WriteLine(httpResponse.StatusCode); } } catch (WebException e) { using (WebResponse response = e.Response) { HttpWebResponse httpResponse = (HttpWebResponse)response; Console.WriteLine("Error code: {0}", httpResponse.StatusCode); using … | |
Re: [b]>I also need the ability to select indvidual nodes of the xml file.[/b] Use DOM API (System.XML namespace) [code] Dim doc As New System.Xml.XmlDocument doc.Load("filename.xml") Dim list = doc.GetElementsByTagName("name") For Each item As System.Xml.XmlElement In list Console.WriteLine(item.InnerText) Next [/code] | |
Re: You should have to change/set the `Target Framework` project property with `.net Framework 3.5.` | |
Re: Enclose `date` value within the pair of # (hash) if field type is `Date` type. CrystalReportViewer1.SelectionFormula = "{sell.Date}>=#" & DateTimePicker2.Value & "# and {sell.Date}<=#" & DateTimePicker1.Value & "#" | |
Re: Welcome, To send an email, you may use the Mail API - [System.Net.Mail](http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx) namespace classes - especially SmtpClient, MailMessage and MailAddress. I suggest you to read the forum rules ([Member rules](http://www.daniweb.com/community/rules)) before you post anything. | |
Re: Use GetHashCode() method. [code] if(o1.GetHashCode()>=o2.GetHashCode()) { // } [/code] | |
Re: Try [Unary bitwise complement ~](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/opsummary.html) operator. | |
Re: In VB.NET, we can use className (i.e. name of Form class - eg Form1.Text) to access the *instance* members from within the `static` methods or other forms/classes. And we use `Me` keyword if we want to use members of FORM from within the `instance` methods of current form. So the … | |
Re: Please read forum [rules](http://www.daniweb.com/community/rules) and an article - [How To Ask Questions The Smart Way?](http://www.catb.org/esr/faqs/smart-questions.html) before you post or ask a question. >can we carry data with session??? Yes - the session state preserve the data into server memory till user's browser is not closed. (for more information add/include your … | |
Re: You didn't mentioned the name of database product you've. However have a look at following code-snippet that uses ADO.NET SqlClient provider (for Microsoft SQL Server database): string cnStr="your_connection_string"; bool isFound=false; using(SqlConnection cn=new SqlConnection()) { using(SqlCommand cmd=new SqlCommand()) { cn.ConnectionString=cnStr; cmd.Connection=cn; cmd.CommandText="SELECT UserID, Status FROM tbl_User WHERE UserID =@UserID and Password … | |
Re: You're comparing references of string objects. Use `String.equals()` method to compare strings: if(word.equals(d)) // else // | |
Re: You may use indexer method of `DataRowView` to obtain selected column value. Dim Equip As DataRowView = ListBox1.SelectedValue Dim val1=Equip(0) 'Returns value from 1st column | |
Re: Take a look at [samples](http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/SlideShow/SlideShow.aspx) at AjaxControlToolki. If you've code and that is not working then post here so anybody can help you out. | |
Re: You may use AjaxControlToolkit control called [ComboBox](http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ComboBox/ComboBox.aspx). | |
Re: You need to understand the what environment is needed to execute WPF app and also how to run this app with partial or full trust. Take a look at these blog-post/threads: 1. [Trust Not Granted: A guide to what you can and can't do with XBAPS](http://www.addedbytes.com/blog/trust-not-granted/) 2. [How to run … | |
Re: You can use Linq To XML. string xmlStr = @"<?xml version=""1.0"" encoding=""utf-16""?> <CurrentWeather> <Location>Madrid / Cuatro Vientos, Spain (LEVS) 40-23N 003-47W 687M</Location> <Time>Dec 22, 2012 - 03:00 AM EST / 2012.12.22 0800 UTC</Time> <Wind> Calm:0</Wind> <Visibility> less than 1 mile:0</Visibility> <SkyConditions> obscured</SkyConditions> <Temperature> 50 F (10 C)</Temperature> <DewPoint> 50 F … | |
Re: ADO.NET or EF? It is all depends upon you and your skill. Go with what you are comfortable. | |
Re: Hi iedapRo. This thread is almost three yeard old. If you want to ask question, start your own (new) thread. Please read [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]daniweb member ru[/URL]le and [url]http://www.daniweb.com/forums/thread78223.html[/url] Thread Closed. | |
Re: Every [URL="http://en.wikipedia.org/wiki/Recursion_(computer_science)"]recursive[/URL] function can be transformed into an iterative function by using a stack. [code] void inverted(int a) { if (a!=-1) { for (int i=0; i<=a; i++) { cout<<"*"; } cout<<endl; inverted(a-1); } for (int i=0; i<=a; i++) { cout<<"*"; } cout << endl; } [/code] Take a look at … | |
Re: You can't use both - DataSource control (codeless approach) and Code methods to handle events of `DataList` control. Choose either one of them. If you've plan to use code then use `IsPostBack` property in page_load to populate the `DataList` control. Something like this: if(!IsPostBack) { string name=Request.QueryString["name"]; string id = … | |
Re: You need to define SQL statemet that fetch rows from both these tables. Please post the tables description if possible. | |
Re: The System.Drawing.Image is an abstract class so use `static` methods to create/load an image. using (Image image = Image.FromFile("file.png")) { //code here } | |
Re: cee_karthi, Which database product are using MYSQL or MSSQL? Post code if you have. Your source must be surrounded with bb code tags. [noparse] [code=vb.net] .. statements.. [/code] [/noparse] | |
Re: You can't change the alignment of 1st column. [code] Listview1.Columns.Add("",0, HorizontalAlignment.Center) Listview1.Columns.Add("Column1", 100, HorizontalAlignment.Center) Listview1.Columns.Add("Column2", 100, HorizontalAlignment.Center) Listview1.Columns.Add("Column3", 100, HorizontalAlignment.Center) ListView1.Columns.RemoveAt(0) [/code] | |
Re: You may use mathematics open source API for your purpose. Mathemaca, /Link is a toolkit that integrates Mathematica and Java. [URL="http://reference.wolfram.com/mathematica/JLink/ref/java/overview-summary.html"]http://reference.wolfram.com/mathematica/JLink/ref/java/overview-summary.html[/URL] J/Link JavaDoc Documentation [URL="http://www.wolfram.com/solutions/mathlink/jlink/documentation/api/"]http://www.wolfram.com/solutions/mathlink/jlink/documentation/api/[/URL] Open source : [URL="http://ojalgo.org/what.html"]http://ojalgo.org/what.html[/URL] | |
Re: May be the reference variable `rec` contains `null` or `gender.SelectedValue` or `martial.SelectedValue` returns `null`. Please add a break-point at these lines and verify the value of reference variables/properties. | |
![]() | Re: You can't handle the button's click event inside the `GridView` instead you've to handle the `RowCommad` event of `GridView` by setting `CommandName` property. Demo: .aspx markup --------------------------------- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundField DataField="ID" HeaderText="ID" /> <asp:BoundField DataField="Name" HeaderText="Name" /> <asp:TemplateField> <ItemTemplate> <asp:Button ID="Button1" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="cmdDelete" Text="Delete" … ![]() |
Re: Maybe you should try to hide the menustrip. | |
Re: In order to prevent SQL-Injection and escape data, you must have to use parameterized SQL statement and do not call `ExecuteNonQuery()` method to fetch the value/data. You should have to use `ExecuteReader() or ExecuteScalar()` method. One important suggestion : Always use "using" block. "using" block will call the "dispose()" method … | |
Re: You need to include the markup in your post that you've tried. I think you need to include the `return url` hidden field that contains the absolute URI of your webapp's resource/page. <form ....> ..... <input type="hidden" name="return" value="http://localhost/WebSite/page1.aspx" /> .... </form> | |
Re: Parse the string and wrap update code in, Datetime dt; if(DateTime.TryParse(date,out dt)) { //code to update record } EDIT: @HunainHafeez : Done, Thanks alot man ! but just for learning purpose tel me that how did it work ? I think return value of Calendar extender will be `DateTime.MinValue`. if … | |
Re: Use [wkhtmltopdf](http://code.google.com/p/wkhtmltopdf/) | |
Re: Handle the doPost() method and use following API to upload a file. 1. [Use Servlet 3.0 Part API](http://docs.oracle.com/javaee/6/api/javax/servlet/http/Part.html) 2. [Apache commons fileupload API.](http://commons.apache.org/fileupload/) Tutorial - [Uploading files in Servlet 3.0](http://balusc.blogspot.in/2009/12/uploading-files-in-servlet-30.html) | |
Re: Use GetValue() or indexer(item) method and verify database null using IsDBNull() method. | |
Re: Handle [b]KeyPress[/b] Event of TextBox control. [code] Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If Not Char.IsDigit(e.KeyChar) Then e.Handled = True End If End Sub [/code] | |
Re: >but how can i get the used rows in the excel file Please let us know your thinking on "used" rows. | |
Re: You need to define a `handler` to [render an image](http://www.hanselman.com/blog/BackToBasicsDynamicImageGenerationASPNETControllersRoutingIHttpHandlersAndRunAllManagedModulesForAllRequests.aspx). | |
Re: Welcome @kezkez. If you want to ask question, start your own thread. Thanks Thread Closed. | |
Re: Why not? Have a look at this link - [URL="http://www.codeproject.com/KB/office/exportxlscsv.aspx"]http://www.codeproject.com/KB/office/exportxlscsv.aspx[/URL] Suggestion : [URL="http://sqlserver-qa.net/google_bart.gif"]http://sqlserver-qa.net/google_bart.gif[/URL] | |
Re: You *must* have to create a `TemplateField` to add `DropDownList` control in it and later you can bind (or populate) it with `GridView.RowDataBound` event. You've to post the code you've tried so far. | |
Re: You can use `format` part of `Eval()`. `ImageUrl='<%# Eval("PictureLink","~/Albums/{0}")%>'` | |
Re: Please read this article - [url]http://visualbasic.about.com/od/aspnethub/a/aspmvcintro.htm[/url] | |
Re: Your XML document is not well-format. [CODE=PHP] <?php $albid=$_GET['ID']; $xmlFile = new DOMDocument(); $xmlFile->load("Residential.xml"); $xml_album = $xmlFile->getElementsByTagName("album"); $i = 0; while ($xml_album->item($i)->getAttribute('ID') != $albid) { $i += 1; } $album = $xml_album->item($i); $children=$album->childNodes; foreach($children as $child) { if($child->nodeType==XML_ELEMENT_NODE) { print "<br/>" . $child->tagName; print " ID : " . $child->attributes->item(0)->value; … | |
Re: [b]>Because there are no errors I'm not sure where to look.[/b] Try to change the path of .mdb in connection string and see what happens? [code=text] Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\CCAdb.mdb;Persist Security Info=True;Mode="Share Deny None" [/code] | |
Re: Use Application.Exit() to terminate an application. | |
Re: [QUOTE=Tulsa;888594]Hello I want to array with key and valu in vb.net as like in php [code] $array['name']="xyz"; $array['surname']="abc"; [/code] so is this possible ? please any suggestion. Thanks in advance[/QUOTE] >I want to array with key and valu in vb.net as like in php. so is this possible ? No … |
The End.