|
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.
|
|
|
|
|
Why would you need VS to publish a website ? You just move it to the server and configure it. Are you a programmer yourself, or are you just hiring programmers in the third world and wondering why they don't have the tools to do their jobs ? As someone else said, you can build a website project in VS2005 if you paid for it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
cbjroms wrote: Why would VS2005 not offer the option of a website project and why is the option to Build/Publish missing for the second programmer?
Which Edition of VS 2005 you are using ? I have been working with VS 2005 Prof. edition, it has Build and Publish option of web sites.
Check this article [^] , Read Publish web sites section.
|
|
|
|
|
Thank you for the replies.
Firstly, I am the 'client' for both of these programmers who I am hiring. I have been working with the first one for a couple of years and know him well. Thorough, cautious, intelligent, helpful but too busy to make the progress that I need. The second programmer is new to me and all I know about him is his CV. Both are UK, freelance VB.Net/SQL developers with broad CVs.
The second programmer is using the standard version (ie not Express but not Pro) of VS2005. Truthfully I expect him to be able to sort out this issue (ie why can he not publish when the other programmer can?) himself and feel quite disappointed that he has passed the problem back to me!
The reason I am asking you guys is to assess whether his inability to sort the problem is reasonable for someone who claims to be proficient in VS2005? Clearly if the problem is a deeply rooted, unique and complex quirk of VS2005 then my expectations might be unreasonably high! But having worked for 6 months with a developer in Russia, who seemed to find his way around everything that got in his way, I am not so sure.
Grateful for your views.
Chris
|
|
|
|
|
I'm looking for a good date and time control. There are plenty of date controls but they all fall short for the time entry portion of the control. Is there a good solution for time entry?
|
|
|
|
|
I think there is one article on CP about this, somebody has developed a user control for this, just search for it.
But I prefer using, CalenderExtender for Date (best for dates), and MaskEditExtender for Time (__:__:__), from AJAX Control Toolkit (available free at ajax.asp.net).
|
|
|
|
|
Hi all
I have a form that updates the image for a user, when i update the image, the old image still appear, the update does not take effect from the first page load
I need your help
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|