Well that is your opinion
Letscode, I appreciate you calling me on it, and I respect that. I am not trying to flame you or anyone else for that matter, so please don't take it as that.
Now this is not necessarily directed to you or Npasma (who is cool, and is making an effort) for that matter. But when you spend day after day reading posts that show right from the start that the user is either
a. Copied and pasted the code and writes a threads saying
"...it doesn't work...why?.." or
b. Takes code and with the assumption of understanding what the code does...but has not processed the logic, or
c. Post a thread asking for coding help with out showing any effort they have put forth, and provide sketchy details, a person becomes a little frustrated.
And the comment:
Monkey's can code it, but people must understand it is valid. Because anyone can type it, but to understand it(process and logic) is the key. Maybe it wasn't the most appropriate way to put it, I admit that, but it the point I was trying to make is appropriate! :!: But your point is well taken. :o :o
My apologies to
Npasma and anyone else I may have offended. It was not my intent.
New coders/programmers/developers need to learn logic before they ever go to type a line of code. Then when they go to coding they can focus on efficiency and coding structure. And too often that is not the case, and then all the lovely stickies, and perma-threads are never read.
Saying that lets get to back to what the post is about.
Napsma the code is looking good except you are still missing a piece of logic...
at least from what I can see with what you provided......that piece being in your Else statement in the
Page_Load event.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
dsSoftware = SoftwareDB.getEntries
Me.BindDataGrid()
Session("dsSoftware") = dsSoftware
Else
'no code needed here, the previous code returned too much of the dataset
End If
End Sub
The else part of the logic statement is entered on POST back, and that is why it is complaining that there is no DataSet.
So, at the end of the Search Button the dataset should contain ONLY that set of data that matches the criteria supplied. You would store it in a Session variable (call it something different for the sake of confusion). Then in the else statement you would retrieve/pass in that dataset from the Session variable.
Hope that helps!
Originally Posted by Letscode
npasma,
Using a pen and paper is a good pratice.
I still use a pen and paper for coding.
Always
1.Get the logic right first.
2.create a small application to test it and UNDERSTAND HOW ITS WORKING
3.Then you code something similar on you main project.
Buddy,You wont believe I read your code 5 times today to help you out but I could not understand whats happening.
Now since I noticed your a cool guy from replying to Paladine remarks(Most of the people wont reply,they just dont come to this website again), there has to be some improvement in your coding style.Dont mistake me.
For your application keep a break point on page load and WATCH WHATS GOING ON.
1.Keep a break point and execute your code.
2.Goto Debug and select Windows and select WATCH ,ME.
3.Hit the F10 key now and see whats going on.
And I also think comments like this could be avoided
Monkey's can type it, people must understand it to follow it.
keep posting, Lets keep the forum alive :cheesy: :cheesy: