|
Sorry about that
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
chaeck the links
[^]"> [^]">
Cheers!!
Brij
|
|
|
|
|
Hi, How can I create a move next command in web development???
Dim DS As New DataSet
TextBox1.Text = DS.Tables(0).Rows(DS.Tables(0).Rows.Count() + 1).Item("ITEM_NAME")
This code that I've used just give a move last command and i can't figure out how to the move next so that I can look for the items in my data base one-by-one.
can you give me some solution?
Thanks a lot in advance.
|
|
|
|
|
do you want to show the ITEM_NAME one by one in textbox?
Cheers!!
Brij
|
|
|
|
|
yes, that's what I'm trying to do. But the code that I've used only showed me the last item in my query.
|
|
|
|
|
You can do onething
Start from 0,increment it and save it in viewstate then next commond take the value from viewstate and show it again same way increment and save it viewstate .Do the same till last element.And show the value like below
TextBox1.Text = DS.Tables(0).Rows(int.Parse(viewstate["counter"])).Item("ITEM_NAME")
Cheers!!
Brij
|
|
|
|
|
Brij wrote: TextBox1.Text = DS.Tables(0).Rows(int.Parse(viewstate["counter"])).Item("ITEM_NAME")
I've tried your code but there are some errors. The "int" can't be loaded and there's a identifier need in the ["counter"] part.
|
|
|
|
|
Keep a Global Variable
and increment it's value when u click on MoveNext
Global Variable intGlobalCount
TextBox1.Text = DS.Tables(0).Rows(intGlobalCount ).Item("ITEM_NAME")
|
|
|
|
|
how can i declare this Global Variable?
|
|
|
|
|
Global variables are ALWAYS a sign of bad design and bad programming. In any case, where would he keep it so that it maintains it's state between postbacks ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yes your right. I've tried to make a variable to act like a counter but ever time the page will postback, the value of the counter will return to its original value.
|
|
|
|
|
Well, the basic issues you have are:
1 - you are requesting the last row ( actually one past ), so that's what you see
2 - as it's a website, if you want the user to click next, and then see a new record, what you're doing is very wasteful. Why not just request the row you want to see ?
3 - the best place for you to store an index of the current record, is the URL. The second best, is viewstate. A static variable is an idiotic idea, it will break your site as soon as you have two users.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yeah. but actually I'm just trying to get the logic of how to check the item one-by-one. Because I'm trying to make a loop statement that will check for the item one-by-one and arrange it in a hierarchy arrangement in my repeater. But if you could give some other alternative and easiest way to do this, that will be a huge help.
|
|
|
|
|
The whole point of a repeater is that you define a single template, then bind to a data source, and it takes care of that. If your data is heirarchical, then you need to nest repeaters and create a data source that presents the data in a logical way. However, this question is pretty much totally unrelated to what you asked inthe first instance.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi,
I am inserting a date into the access database but if the date value is null it gives error.can any one tell me how to check weather the date i entered is null while inserting..
Thanks in advance...
|
|
|
|
|
If you're using C#, you can use the ?? operator, as in myDate ?? DateTime.Now
however, you'd do better to write your DB to accept nulls, or not accept nulls from the end user. Actually, you may need to replace the null with DbNull.Value, to insert a null.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
for string i am using
textbox1.text==""?string.empty:textbox1.text
and how to use for date....
|
|
|
|
|
OK, well, that's kind of retarded. IF the string is empty, you pass in an empty string. You may as well pass in textbox1. text ( seriously, why are you calling it that, are you entering an obsfucation contest ? ).
For a date, there's no empty date value, so you have to set up your DB to accept null, OR you need to create a 'magic' date which means null. The second option is nasty as all hell.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
mates,
need help again.
I have a dropdownlist that I want a blank value as the initial value. I'm binding this dropdown box through the designer and not the code behind. Where do I need to put the items.insert line so that this item shows up in the dropdownlist.
thanks in advance,
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
set AppendDataBoundItems=true , then Insert value which you wants
|
|
|
|
|
Hi
I uploaded a web form with ajax enabled,
i am getting this error on my web page ['sys' is undefined] and the page is doing postback.
can you help please.
Mohammad Al Hoss
Development To Me Is A Pleasure more than a Job
|
|
|
|
|
Server might not have AJAX server extensions installed.
|
|
|
|
|
Mohammad Al Hoss wrote: I uploaded a web form with ajax enabled,
I assume this means you're using ASP.NET AJAX ? AJAX is enabled on all web pages, across the world, by default.
Mohammad Al Hoss wrote: i am getting this error on my web page ['sys' is undefined] and the page is doing postback.
Does it work on your local machine ? If so, then the other poster is probably right, the library needs to be on the server.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have brought a second programmer onto my website development team - both work remotely.
The first programmer has been working on the project in VS2005 for nearly 2 years and has passed a copy of the source code to the second programmer and advised that it will only Build properly (ie without errors) if put together as a website project as opposed to a web application.
The second programmer is also using VS2005 and has reported that Visual Studio doesn't give him the option of a website project template only web application or website deployment project. So he is using the website deployment option but reports that VS2005 does not allow him to Publish this type of project only build it.
Why would VS2005 not offer the option of a website project and why is the option to Build/Publish missing for the second programmer?
I would really appreciate some advice here - it is so frustrating.
Thanks in anticipation.
Chris
|
|
|
|
|
As per my knowledge, Publish option is not available in Visual Studio Express Editions. so if he is using Express Edition then he will not able to publish the website.
|
|
|
|