
eramgarden
Avatar/Signature-
Posts
583 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by eramgarden
-
Thank you. Amazon has good reviews on Refactoring book.
-
I've been reading this website about OOP. I need to wrap my head around OOP and have general questions. For example: http://www.dotnetjunkies.com/Tutorial/B1E4CE82-962D-4220-956E-1E4775ACCD46.dcik 1. Why should I use "overloading" when I can have 2 functions with 2 different names?? (Look at "Method Overloading") 2. When should I use "Interfaces"? why should i use them when I can have regualr classes to inherit from? 3. When and why should I use "abstract" classes when I can just have regualr classes to inherit from? 4. Why should I use Polymorphism when I can just have separate functions doing whatever?? (look at "Polymorphism" section) is there a rule of thump to use what type of ...classes, polymorphism, sturcts, etc ...where?
-
do u have a simple example or a link to an example? I think having separate code ...one for SQL, one for AS400...makes it tedious to change.
-
I had an interview today and I looked at their ASP.Net/VB.Net app. I was told that the app interacts with AS400/IBM and SQL Server;therefor, the ex-developer developed 2 sets of "data" tier...one to interact with AS400 and one to interact with SQL Server. My question is: did he actually need to develop 2 sets of "data" layer/tier code?? Couldnt there be logic to use, for example, this data connection, if it's AS400..go down this path if it's SQl Server?? How would you design a data layer/tier to interact with 2 databases?
-
I'm concating a string together. Then using "indexof" to see if a particular string is in that concated string. I used the link below: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=169&lngWId=10 ---This is what i have: dim tempCostIDs as string tempCostIDs = string.Empty ... tempCostIDs = tempCostIDs & "," & cost.CostTypeID & "," ... Dim Freight As String Freight = ",1," Dim r As Integer [b] r = tempCostIDs.IndexOf(Freight) [/b] If r > 0 Then 'do whatever End If -- I put a debug step. I see "tempCostIDs" has having ",1," in it but that r>0 fails . Howcome it cant find the string in it??
-
This is what i was looking for ...for anyone else who needs it, here's the answer: http://timstall.dotnetdevelopersjournal.com/making_a_messagebox_in_javascript.htm
-
This doesnt seem that hard but i'm drawing blank.. In my whatever.aspx, i have a hidden button. In the code behind, I have a javascript string like this; dim myScript as string = "<script language=javascript>" & _ " if confirm('question?') == true { " & _ "[b] I want to click that hidden button [/b] "}" & _ " </script>" How do I click a button in Javascript?
-
know how to do a pop-up in ASP.Net. For example, user clicks on a button, the pop-up pops, asks a question, user clicks "ok" or "cancel" and the code captures the result (ok or cancel). But this is what I want to do: User clicks on a button. Pop-up pops and user clicks ok. code does some processing and returns value of True If value is true, pop another pop-up dialog and ask user if they want to continue How can I do the second pop-up?? I have found some examples like the one in this link but this is when user clicks on something http://riderdesign.com/articles/displayarticle.aspx?articleid=13
-
http://www.ondotnet.com/pub/a/dotnet/2003/02/24/aspdatactl.html
-
found my answer. I can use pnl1.visible=true...and toggle like that.
-
I have a panel and one "add" button. When user clicks on the Add button, i hide one panel and display the other panel. The second panel displayed has text fields on it where users enter info and click the add button again and save to database. Well, if I have ONE "add" button with the hide/unhide panel AND the insert code, code just keeps on going and adds a blank row to the table, then displays the text fields. so this is what i did I created TWO add buttons. One is when the user clicks and it hides/unhides the panel. The second "add" button actually saves to the database. Any other way of having only 1 add button to perfom the 2 functions: hide/unhide and save to DB only when user has actually entered data in the text fields?
-
Thanks, I just figured it out when I saw your response. I was missing "new" from Dim objUserFields As UserFields
-
Not sure why I get "Object reference not set to an instance of an object" -- This is what I have: Created a User Object: Public Class UserFields Private intUserLoginNum As Integer = 0 Private strUserEmail As String = "" Public Property UserLoginNum() As String Get Return intUserLoginNum End Get Set(ByVal Value As String) intUserLoginNum = Value End Set End Property Public Property [b]email_address()[/b] As String Get Return strUserEmail End Get Set(ByVal Value As String) strUserEmail = Value End Set End Property End Class Trying to assign a value to a property in my Function Dim objUserFields As UserFields Dim dr As SqlClient.SqlDataReader Dim cnn As New SqlClient.SqlConnection(...) Dim cmd As New SqlClient.SqlCommand("usp_rt_get_userEmail", cnn) cnn.Open() cmd.Parameters.Add("@UserLogin", userLoginId) cmd.CommandType = CommandType.StoredProcedure Dim dt As New DataTable Dim da As New SqlDataAdapter(cmd) da.Fill(dt) [b]objUserFields.email_address = dt.Rows(0)("email_address") 'I get the error here [/b] Columns in Datatable are "email_address" and "User_login_id"... What am I missing??
-
I have a function that returns a string array. A developer said I can do this: return a User object. As things get more complex, add properties to that user object. Anyone has an exmple of creating and returning a userobject?
-
Found my answer. I have to use "<select>" and not "<asp:dropdownlist>" control. Missed that in the article.
-
Sorry, It doesnt show the color. It's still "black". I also tried: ddlRptName.Items(i).Attributes.Add("style",[b] "Background-color:red"[/b] + ddlRptName.Items(i).Text) But the background is still white.
-
That worked, thanks. I'm following this example to add color to the background of my DropdownList ..not sure why mine doesnt work: http://www.c-sharpcorner.com/Code/2003/July/DropDownListBox.asp Public Function GetDll(ByRef retval As DataSet, ByRef ddlRptName As DropDownList) As DataSet ... Dim cmd As New SqlClient.SqlCommand("usp_rt_get_reportFiles", cnn) Dim da As New SqlDataAdapter(cmd) ... da.Fill(retval) Dim i As Integer For i = 0 To retval.Tables(0).Rows.Count - 1 ddlRptName.Items.Add(New ListItem(retval.Tables(0).Rows(i)("NewName"))) ddlRptName.Items(i).Attributes.Add("style", "color:red") Next ... Return retval ..
-
I have a dropdownlist. I want to read the data from database and populate it. I know I can do it in the code behind by populating a dataset..as explained in this link: http://www.experts-exchange.com/Web/Q_21489607.html But I like to create a class, in my code-behind call that Class and populate the ddl.. I know how to create the class, but what should be passed to it from my code-behind, what should the "return" value of the function be? If someone could give me an outline/class shell..that would be good too. Thanks
-
if it's refilling it, does it do it on postback? maybe on postback, dont refill it (if your're calling a function to populate the ddl, then dont on postback)
-
We replaced a dll in production (running on windows 2003) and it reset the application. I think that behavior is correct because anytime you replace a dll, it must read the changes on that first hit... Is there something in 2003 to contradict this (that replacing a dll WILL NOT restart the app??) Has anyone come across it otherwise?
-
I think 1.0 and 1.1 CAN run side by side on the same machine..cant they?
-
Developers who wrote this app have performance counters and the code writes to the event log. With this and Windows2003, we're getting access denied... Is there an alternative to writing to "event logs"? Is it possible to create custom event logs and write to those?
-
Our ASP.Net Framework 1.1 is running with SP1. Is this correct or do we need another SP?
-
well, this didnt fix it..
-
this isnt happening in production. Only in our test environment and it's the same code.. hmmm