479 Posted Topics

Member Avatar for front_&_center

The following line reads the database connection information from web.config file. [CODE] 35. Dim myConn As New SqlConnection(ConfigurationManager.ConnectionStrings("cs").ConnectionString) [/CODE] The sql server connection details can be stored in web.config something like as below. [CODE] <appSettings> <add key="cs" value="Server=YourServerName;Database=Northwind;User Id=testuser;Password=somepassword;" /> </appSettings> [/CODE] You can also specify the connection details in …

Member Avatar for Netcode
0
563
Member Avatar for SJai

Hi, What do you mean by 'Common Controls' in asp.net? Are you referring the controls put inside an User Control? Please provide more details.

Member Avatar for Ramesh S
0
69
Member Avatar for mgonzalezwec

Hi, The machine.config file can be located in the following folder in the server/PC. drive:\<windows>\Microsoft.NET\Framework\<version>\config\machine.config You can open it using notepad or VS 2005. [url]http://quickstarts.asp.net/QuickStartv20/aspnet/doc/management/mgmtapi.aspx[/url]

Member Avatar for mgonzalezwec
0
207
Member Avatar for kiran.madke

Hi, GridView.SelectedIndexChanged Event occurs when a row's Select button is clicked, but after the GridView control handles the select operation. GridView.SelectedIndex property returns the zero-based index of the selected row in a GridView control. You are trying to assign the row index to the PageIndex property which is completely wrong.

Member Avatar for Ramesh S
0
86
Member Avatar for cavpollo

Basically an aspx page will have controls like buttons and textboxes associated with them. Also the page will have a class file associated with it to handle the events related to the page. If you want to create an aspx page dynamically, you cannot maintain the page alignment, controls and …

Member Avatar for cavpollo
0
192
Member Avatar for cavpollo

Hi, Just check the control's ID found in the JavaScript and ID tag of the image control in the HTML source. You can do it by Right click->View Source.

Member Avatar for cavpollo
0
673
Member Avatar for ashajahanmca

The [URL="http://msdn.microsoft.com/en-us/library/system.web.httpapplication.acquirerequeststate.aspx"]HttpApplication.AcquireRequestState[/URL] event occurs when ASP.NET acquires the current state (for example, session state) that is associated with the current request. Since you used to redirect to timeouterror page in the Application_AcquireRequestState event, first time it redirects to timeouterror page. Why do you redirect to timeouterror page in Application_AcquireRequestState event?

Member Avatar for Ramesh S
0
58
Member Avatar for Tejashri

Hi, Refer the following links. [URL="http://stackoverflow.com/questions/2449328/how-do-i-scrape-information-off-asp-net-websites-when-paging-and-javascript-links"]How do I scrape information off ASP.NET websites when paging and JavaScript links are being used?[/URL] [URL="http://stackoverflow.com/questions/2777555/asp-net-scrapping-grid-pages"]Asp.Net Scrapping Grid Pages[/URL] [URL="http://stackoverflow.com/questions/260540/how-do-you-screen-scrape-ajax-pages"]How do you screen scrape ajax pages?[/URL]

Member Avatar for Ramesh S
0
305
Member Avatar for vegascasino21

Hi, The index.aspx is set as the default document to your web site. You can change or remove it in IIS 6.0 using the following steps: 1. Open the IIS ( Start->inetmgr) 2. In the IIS, Expand Server Name->Web Sites->Right click on your site->Select Properties menu 3. In the Properties …

Member Avatar for Ramesh S
0
126
Member Avatar for satiss7pwr

Hi, The only requirement to access an asp.net web application (if not web service) from client PC is a browser like IE, Firefox etc. You don't need to install Oracle client at client PCs. If asp.net application and Oracle database are running different servers, you need to install Oracle client …

Member Avatar for Ramesh S
0
158
Member Avatar for sbglobal

Hi, The AutoCompleteExtender may not work within a UserControl due to its limitations. Refer the following link for more details. [URL="http://stackoverflow.com/questions/1114957/hot-to-user-autocompleteextender-in-a-usercontrol-ascx-and-place-the-serviceme"]Hot to: user AutoCompleteExtender in a UserControl (ascx) and place the ServiceMethod on its code-behind.[/URL] You can try to use jQuery.

Member Avatar for Ramesh S
0
402
Member Avatar for dpreznik

Are you using UpdatePanel in your page? If yes, check the solution( see in the bottom) given in this [URL="http://forums.asp.net/p/1045910/1467260.aspx"]thread[/URL]. Also check whether you are binding crystal report in each postback in page_load event. Try to call inital page load like below [code] if (!Page.IsPostBack) { LoadCrystalReport(); } [/code]

Member Avatar for amit121
0
378
Member Avatar for Ana D.

If see ViewSource of the HTML for your page, <%=SearchCriteriaTextBox.ClientID %> is not rendered properly. You can change your code as below [CODE] <asp:TextBox ID="SearchCriteriaTextBox" runat="server" Text="Enter Search Criteria" Width="150px" ForeColor="GrayText" OnClick="this.value = ''; this.style.color = 'black'" OnBlur="javascript:changeText(this.id)" /> [/CODE]

Member Avatar for yamanshr
0
467
Member Avatar for kanuri1

The built-in feature of .NET String class has methods to remove spaces in a given string. Why do you want to go for a custom method? [CODE] String str1 = "This is a string" String str2 = str1.Replace(" ", String.Empty) [/CODE] Here str2 will have the string value "Thisisastring".

Member Avatar for crishjeny
-1
262
Member Avatar for Anupama G

Hi Anupama, Try the following code. .aspx code [CODE] <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator"></asp:CustomValidator> <asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" OnTextChanged="TextBox1_TextChanged"></asp:TextBox> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> [/CODE] C# Code behind [CODE] public static bool IsValidDate(string date) { try { Regex reDate = new Regex(@"\b([0-9]{1,2}[\s]?[\-/\.\–][\s]?[0-9]{1,2}[\s]?[\-/\.\–][\s]?[0-9]{2,4})\b|\b(([0-9]{1,2}[TtHhSsRrDdNn]{0,2})[\s]?[\-/\.,\–]?[\s]?([Jj][Aa][Nn][Uu]?[Aa]?[Rr]?[Yy]?|[Ff][Ee][Bb][Rr]?[Uu]?[Aa]?[Rr]?[Yy]?|[Mm][Aa][Rr][Cc]?[Hh]?|[Aa][Pp][Rr][Ii]?[Ll]?|[Mm][Aa][Yy]|[Jj][Uu][Nn][Ee]?|[Jj][Uu][Ll][Yy]?|[Aa][Uu][Gg][Uu]?[Ss]?[Tt]?|[Ss][Ee][Pp][Tt]?[Ee]?[Mm]?[Bb]?[Ee]?[Rr]?|[Oo][Cc][Tt][Oo]?[Bb]?[Ee]?[Rr]?|[Nn][Oo][Vv][Ee]?[Mm]?[Bb]?[Ee]?[Rr]?|[Dd][Ee][Cc][Ee]?[Mm]?[Bb]?[Ee]?[Rr]?)[\s]?[\-/\.,\–]?[\s]?[']?([0-9]{2,4}))\b|\b(([Jj][Aa][Nn][Uu]?[Aa]?[Rr]?[Yy]?|[Ff][Ee][Bb][Rr]?[Uu]?[Aa]?[Rr]?[Yy]?|[Mm][Aa][Rr][Cc]?[Hh]?|[Aa][Pp][Rr][Ii]?[Ll]?|[Mm][Aa][Yy]|[Jj][Uu][Nn][Ee]?|[Jj][Uu][Ll][Yy]?|[Aa][Uu][Gg][Uu]?[Ss]?[Tt]?|[Ss][Ee][Pp][Tt]?[Ee]?[Mm]?[Bb]?[Ee]?[Rr]?|[Oo][Cc][Tt][Oo]?[Bb]?[Ee]?[Rr]?|[Nn][Oo][Vv][Ee]?[Mm]?[Bb]?[Ee]?[Rr]?|[Dd][Ee][Cc][Ee]?[Mm]?[Bb]?[Ee]?[Rr]?)[\s]?[,]?[\s]?[0-9]{1,2}[TtHhSsRrDdNn]{0,2}[\s]?[,]?[\s]?[']?[0-9]{2,4})\b"); Match mDate …

Member Avatar for devi.....
0
934
Member Avatar for sara10mor

Are you opening any popup in your javascript function which is called in mouse over event. Also check the path used in your img control is correct. Check this link: [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;816362[/url] [url]http://stackoverflow.com/questions/226102/stack-overflow-in-line-0-on-internet-explorer[/url]

Member Avatar for 99MichaelB99
0
238
Member Avatar for selicon.valley

Hi, Instead of creating all the functional components of the Shopping Cart application by yourself, You can try to use third party/open source tools in your e-commerce site. You can find some open source/third party tools/kits in the following links [URL="http://www.asp.net/community/projects"]ASP.NET Community - Open Source Projects and Starter Kits[/URL] (Refer …

Member Avatar for Ramesh S
0
189
Member Avatar for Pari13

You can use Query String to pass a data beween the parent page and the popup window. Check these links. [URL="http://www.codeproject.com/KB/aspnet/QueryString.aspx"]Passing variables between pages using QueryString[/URL] [URL="http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx"]How to: Pass Values Between ASP.NET Web Pages[/URL]

Member Avatar for dlrahul
0
190
Member Avatar for achiman

[QUOTE] The good solution: [code=sql]SELECT * FROM (SELECT * FROM emp ORDER BY sal DESC) WHERE ROWNUM <= 3[/code][/QUOTE] What anubina wrote is correct. The syntax is [code] SELECT * FROM (SELECT * FROM table_name ORDER BY col_name DESC) WHERE ROWNUM <= N; [/code] Check this [URL="http://www.orafaq.com/faq/how_does_one_select_the_top_n_rows_from_a_table"]link[/URL]

Member Avatar for anubina
0
351
Member Avatar for kayfar

Hi Kayfar, Try this code. [CODE] private void button1_Click(object sender, EventArgs e) { OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Northwind.mdb"); conn.Open(); String sqlText = "SELECT * FROM Customers WHERE CompanyName LIKE '%" + textBox1.Text + "%'"; OleDbDataAdapter adapter = new OleDbDataAdapter(sqlText, conn); DataTable dtCust = new DataTable(); adapter.Fill(dtCust); conn.Close(); dataGridView1.DataSource = …

Member Avatar for kayfar
0
130
Member Avatar for laghaterohan

Hi, Take a look at the following link. [URL="http://stackoverflow.com/questions/228549/get-gridview-selected-row-datakey-in-javascript"]Get GridView selected row DataKey in Javascript[/URL]

Member Avatar for Ramesh S
0
170
Member Avatar for nick3592

Hi nick3592, In addition to Lusipu advise, Here is mine, To develop web applications in asp.net, you need to learn any of the programming languages C# or VB.NET and .NET object model (classes/components) specific to asp.net. If you learn C# or VB.NET, you can also easily work in the following …

Member Avatar for almostbob
0
213
Member Avatar for dougancil

Hi Doug, StreamReader is one of the good option to parse the csv file. But you need to write extra code to parse each row in the csv file and then post to sql server. You can also try to use System.Data.OleDb namespace to read and load the csv file …

Member Avatar for Ramesh S
0
307
Member Avatar for iamchamith

Hi, When you run an ASP.NET application from VS 2005 (without using IIS), it runs under your account's security context. Since you may have read/write access to the folder, you are able to upload files to that folder from your application. But When you deploy and run an ASP.NET application …

Member Avatar for Ramesh S
0
258
Member Avatar for nikntech

Hi, You can look for a third party or open source control to implement the chat functionality in your asp.net site. Check the following links. [URL="http://chat.codeplex.com/"]Subgurim Chat ASP.NET[/URL] [URL="http://cutesoft.net/ASP.NET+Chat/"]CuteChat[/URL] [URL="http://www.webfurbish.com/"]JaxterChat[/URL] [URL="http://www.aspnetajaxchat.com/"]ASP.NET Ajax Chat[/URL]

Member Avatar for Ramesh S
0
99
Member Avatar for Member 785293

Hi, You can also try to use [URL="http://jqueryui.com/demos/tabs/"]jQuery Tab[/URL] feature.

Member Avatar for Ramesh S
0
286
Member Avatar for Member 784743

Hi, ASP.NET does not have a built-in text format tool bar/editor in VS 2005/2008. You can try to use a third party or open source controls to format the mail content in your web page. Check the following links. [URL="http://freetextbox.com/default.aspx"]FreeTextBox[/URL] - Free HTML Editor. [URL="http://ckeditor.com/"]CKEditor[/URL] [URL="http://nicedit.com/"]NicEdit[/URL] [URL="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HTMLEditor/HTMLEditor.aspx"]ASP.NET Ajax Toolkit - …

Member Avatar for Ramesh S
0
83
Member Avatar for baladeveloper

Hi, In ASP.NET, a template is property of a server control that describes the static HTML, controls, and script to render within one region of the control. The EditItemTemplate property lets you specify how the cell will change when a row in a DataBound control such as GridView is put …

Member Avatar for baladeveloper
0
313
Member Avatar for shithindas

Hi, Refer the following link. [URL="http://www.asp.net/hosting/tutorials"]ASP.NET Hosting Tutorials[/URL]

Member Avatar for shithindas
0
89
Member Avatar for killoldesai

OpenContacts.NET is open-source library for importing contacts from popular web-mail services. Now supports: GMail, Yahoo! Mail, Live (Hotmail). Check this link. [URL="http://sourceforge.net/projects/opencontactsnet/"]OpenContacts.NET[/URL]

Member Avatar for karthikdotnet
0
151
Member Avatar for jithusdani

If You have used ASP.NET Ajax Framework 1.0 and the site is ASP.NET 2.0 based , then you need to install Ajax Framework in the server(in addition to .Net 2.0). Becuase the Ajax DLL has to be registed in GAC. If your project is asp.net 3.5 based, then you should …

Member Avatar for Shivashankar.C
0
97
Member Avatar for needanswer

Hi, You need to bind the GridView, after inserting records into the database. Here is the sample code. [CODE] Imports System.Data Imports System.Data.OleDb Partial Class DemoPage1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then BindGridView() End If End Sub Private …

Member Avatar for needanswer
0
258
Member Avatar for gershom

Hi, You can reset Visual Studio Settings in two ways 1. From Visual Studio IDE Click Tools Menu->Import and Export Settings->Reset all settings. 2. From Command Prompt Start Menu->All Programs->Microsoft Visual Studio 2008->Visual Studion Tools-> Visual Studio 2008 Command Prompt. This will open the command prompt. Type the following command: …

Member Avatar for Ramesh S
0
122
Member Avatar for jamshed ahmed

Hi, The ID of the 'chkHomePhone' will be prefixed with the parent control names when you put the control inside containers such as Accordian control. Find the actual ID of the control by opening the aspx page in IE ->Righ click->View Source in IE. The control ID will look like …

Member Avatar for Ramesh S
0
103
Member Avatar for add4

Hi, System.Drawing.Image is an image (store as byte array in memory) where as System.Web.UI.WebControls.Image is a asp.net server control. Both are completely different and you cannot simply convert this. What are you trying to achieve? You can write a http handler in asp.net which writes the bytes of array to …

Member Avatar for Ramesh S
0
112
Member Avatar for shithindas

Hi, Have look at the following links. [URL="http://http://www.w3schools.com/aspnet/default.asp"]ASP.NET Tutorial - with ASP.NET 2.0[/URL] [URL="http://quickstarts.asp.net/QuickStartv20/aspnet/Default.aspx"]ASP.NET Quickstart Tutorial[/URL] [URL="http://asp.net-tutorials.com/basics/introduction/"]http://asp.net-tutorials.com/basics/introduction/[/URL]

Member Avatar for Ramesh S
0
86
Member Avatar for emilio

Regular expression are used to validate inputs such as email, phone numbers etc. Basically they are used to validate if the input is in a pre-defined format. In your case, the login control's input are validated against the user id and password which are stored in the backend database. Why …

Member Avatar for Vally
0
148
Member Avatar for mwaqas1990

Hi, [URL="https://www.packtpub.com/expert-guide-for-social-networking-with-asp-.net-3.5/book"]ASP.NET 3.5 social Networking by Andrew Siemer[/URL] is a good book which you guide to building enterprise-ready social networking and community applications with ASP.NET 3.5. [URL="http://www.dotnetnuke.com/"]DotNetNuke[/URL] is the leading open source web content management system (CMS) and application development framework for Microsoft .NET. You can try to implement the …

Member Avatar for mwaqas1990
0
89
Member Avatar for dnanetwork

Hi, You can find some sample source code here. [URL="http://stackoverflow.com/questions/198082/how-to-find-out-size-of-session-in-asp-net-from-web-application"]How to find out size of session in ASP.NET from web application?[/URL] [URL="http://www.codeproject.com/KB/session/exploresessionandcache.aspx"]Exploring ASP.NET Session State and Cache data[/URL]

Member Avatar for dnanetwork
0
99
Member Avatar for Alex John

Yes. you need to add the following namespace [code] using iTextSharp.text.html; [/code]

Member Avatar for kvprajapati
0
122
Member Avatar for rambok4

In line 18, you are using SqlCommand object to open a connection which is wrong. You need to use [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx"]SqlConnection [/URL]object to open a databas connection. [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx"]SqlCommand [/URL]represents a Transact-SQL statement or stored procedure to execute against a SQL Server database. Try the following code. [code] Protected Sub btnLogin_Click(ByVal sender …

Member Avatar for kvprajapati
0
240
Member Avatar for jamshed ahmed

Put the return statement out of else block in GetCounterValue() method. [CODE] private int GetCounterValue() { StreamReader ctrFile; FileStream ctrFileW; StreamWriter sw; string Path = Server.MapPath("Counter.txt"); string CounterContents; int nCounter; if (File.Exists(Path)) { ctrFile = File.OpenText(Path); CounterContents = ctrFile.ReadLine().ToString(); ctrFile.Close(); nCounter = Convert.ToInt32(CounterContents); } else { nCounter = 0; nCounter++; …

Member Avatar for Sals
0
139
Member Avatar for gptArun

Hi, You can try to use [URL="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.pickerentity.aspx"]PickerEntity[/URL] object to retrieve the values from PeopleEditor control. For example, To get the Email Address use PickerEntity object to retrieve the values from PeopleEditor control. [CODE] PickerEntity pckEntity = (PickerEntity)peResponsible.ResolvedEntities[0]; //Here peResponsible is a PeopleEditor Control string email = pckEntity.EntityData["Email"].ToString(); [/CODE] Reference: [URL="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.peopleeditor.aspx"]PeopleEditor …

Member Avatar for Ramesh S
0
242
Member Avatar for ndhamecha

Hi, Check this link. [URL="http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx"]Creating Cascading DropDownLists in ASP.Net[/URL] It has sample code with table design and asp.net code. It exactly matches with your requirement.

Member Avatar for Ramesh S
0
96
Member Avatar for ans2007kumar

Try this code. [code] ListItem item = dropdownlist1.Items[dropdownlist1.Items.Count-1]; [/code]

Member Avatar for Ramesh S
0
67
Member Avatar for joseph2010

FilterType in ASP.NET Ajax FilteredTextBox will have the following options: 1. Numbers 2. LowercaseLetters 3. UppercaseLetters 4. Custom You can specify more than one options as a comma-separated combination of them. If Custom is specified, the ValidChars field will be used in addition to other settings such as Numbers. Refer …

Member Avatar for joseph2010
0
115
Member Avatar for inAweofOOP

Instead of using Response.Redirect("Some file Name") using Response.WriteFile() method which writes the contents of the specified file directly to an HTTP response output stream as a file block. For example, [Code] Response.WriteFile(@"D:\Temp\Test1.docx") ; //Response.WriteFile(path + fileToOpen); [/Code]

Member Avatar for inAweofOOP
0
171
Member Avatar for Omar123

When adding controls to an asp.net page dynamically, It has to be done in Page_Load or Page_init events. Then only the viewstate will be maintained between postbacks. The events for those conctrol will fire properly. In which event are you adding table and radio button controls to the page?

Member Avatar for Omar123
-1
126
Member Avatar for thami

Try the following links. [URL="http://www.mediacollege.com/internet/javascript/page/scroll.html"]How to Scroll a Page With JavaScript[/URL] [URL="http://techfoolery.com/archives/2006/08/11/2021/"]Animated Page Scrolling with Javascript[/URL]

Member Avatar for Ramesh S
0
66
Member Avatar for khan17

Hi, The code that you posted is to be used in WebBrowser control in Windows Forms application. It is not intend to be used in asp.net application. In what do you want to click link? Server side or cliend side? If you want to click a link using JavaScript, use …

Member Avatar for khan17
0
518

The End.