Jump to content
Xtreme .Net Talk

praveensg

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by praveensg

  1. Got it Rod. Thanx a bunch. Guess I better use Notepad instead :D
  2. Hello Friends, This might sound really stupid but I'm runnin into this problem. I have a dropdownlist in my aspx page which uses a .vb file. I'm trying to populate the dropdownlist in the Page_Load event that I've written in the codebehind file. However, it throws me an error saying Name not declared. Following are my files. Let me know what Im doing wrong. Thanq Praveen Herez the .vb file Imports System Imports System.IO Imports System.Text Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.Page Public Class RegisterClass:Inherits Page Public Sub Page_Load(Sender As Object,e As System.EventArgs) Dim i as Integer Dim DtNow As DateTime Dim strConnection As String strConnection = System.Configuration.ConfigurationSettings.AppSettings("ConnectionString") ddlDay.Items.Add("Day") . . . . The .aspx file <%@ Page Language="VB" src="register.aspx.vb" Inherits="RegisterClass" ContentType="text/html" ResponseEncoding="iso-8859-1" %> <link rel="stylesheet" type="text/css" href="styles.css" /><html> <head> <title>Registration</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> . . . . . . <asp:dropdownlist ID="ddlDay" runat="server"></asp:dropdownlist>
  3. fguihen, asp.netz concept is totally different from the good ole classic ASP. In order to overcome the problem of intertwined presentation and function, MS came out with this style. With ASP.Net you keep ur functional logic away from your presentation logic. So you need to stop comparing ASP.Net with Classic ASP or if you're thinking bout converting things, then forget it totally. Itz possible but for that you don't need .Net!!! :D
  4. why dont you save all the values within the textboxes back to the database? Anyways u gotto have O(n) to traverse all the textboxes. Im not sure if I've understood your problem correctly.
  5. One thing I've noticed though. The password box is always a little smaller than the other textboxes. Their default sizes I mean!!! Wonder why :confused:
  6. VarName=Session("DepartmentName") Hope I understood your question :D
  7. guess you can pass the variables by reference. that way changes to their values are reflected back in the calling program too.
  8. lstYourListName.Items.Clear b4 populating the list
  9. Or maybe use global variables:)
  10. I am not really sure now. Maybe some of our more knowledgeable Xtremers might help us figure this out. I don't want to risk it because my project has data entry screens that take like 20-25 minutes to fill in :) This would be a real handicap when you enter data for 20 minutes, you hit save and it takes u to the login page.
  11. Yeah right. That used to happen to me within the timeout itself. I set the Session.TimeOut function to 60 but even then it used to happen. So I changed the setting in the web.config file. I think it has stopped now. I am not sure. So how are you guys setting the timeout threshold? In the Web.Config file or in the first page?
  12. you need to create an instance of an object before you use it.
  13. Hi Joe, Yes I think it is derived from System.Web.UI.Page!!! This is my codebehind code. Now I try to add this in my project, and it doesn't show up in the Sol Explorer:( Imports System Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.Page Public Class MyCodeBehind : Inherits Page Public strOutput as String Public strConnection As String Public Sub SetstrConn strConnection="data source=QMWORKS;User ID=praveen;Password=********;database=crustali;Connect Timeout=30;" End Sub Public Sub btnCancel_Click(Sender as Object, E as EventArgs) Response.Redirect("Homepage.aspx") End Sub Public Sub LogOutClick(sender as System.Object, e As System.EventArgs) Session.Abandon() Response.Redirect("Login.aspx") End Sub Public Structure Product_Info Dim Name As String Dim Unit As String Dim Species As Integer End Structure Public Structure CruiseDataSet Dim DataSetName As String Dim TractStandName As String Dim TallyType As String Dim CruiseType As String Dim PlotBAFSize As Single Dim NumberOfPlots As Integer Dim AcresInTally As Single Dim ProductInfo() As Product_Info End Structure Public Structure DataSetProdSpec Dim SpeciesName As String Dim MinDBH As Single Dim MaxDBH As Single Dim DBHInt As Integer Dim HtMeasure As String Dim LogLen As Single Dim MinHt As Single Dim MaxHt As Single Dim HtInt As Single Dim VolEq As Integer Dim FrmCls As Integer Dim LRule As String Dim TblName As String Dim No(,) As Integer End Structure End Class
  14. Yes my case is c) I have already written the class module which I want to make use of in my prj. I added the .vb file to the project by adding it as a new item with the help of the solution explorer. however, it does not show up in the solution explorer. And I think this is the reason it throws me the error that it cannot find the inherited class:(
  15. Hello Friends, I am very new to .Net and the VS.Net IDE. So I will definitely sound silly to you guys when I ask this question. I have been working on an ASP.Net project from quite some time now. However, most of the coding I did using Dreamweaver (No VS.Net IDE). I have a code behind file that I use to set up a connection with the SQL Server Database. And I use the classes within this file in aspx pages where I need to setup a connection. I used a code behind file so that I could change the connection string easily every time I uploaded my files to the production server. Now, I am trying to make use of a readymade web control in one of my aspx pages. For that, I tried using VS.Net IDE. However, it throws me an error saying that the class I'm using within an aspx page is not available. Now I know that code behind file contains the class. However, I do not know how to add this code behind file to my project/solution. Please elaborate with a solution for my problem. Also please let me know what is a solution, project. And how do I change the default directory that is used to create solutions. Thanx a lot, Praveen
  16. Friends, I am new to this forum and Im seeking your help for a problem :(. Well, I am trying to draw a series of HTML Tables (control) based on certain conditions. Basically, there is a loop which iterates different number of times based on the value of a variable(grabbed from SQL DB). Now the number of times I need to draw this table is not known to me b4hand. However, I need to reference an HTML Table control in the presentation of the page. My problem is how do I change the ID of the table dynamically so that I have n tables? Hope I conveyed my problem properly :D -Praveen
  17. Oops forgot the link http://www.aspnetpro.com/NewsletterArticle/2003/08/asp200308mb_l/asp200308mb_l.asp
  18. this might be of help even though itz not pure VB script.
  19. In fact, I guess you cannot even retrieve ASP session Variables on .net pages
  20. Itz a UDT:)
×
×
  • Create New...