Hello..
i develope a web projects of horoscope or astrology(http://demo.reallianzbussimart.com/allzodiac.aspx), there is an 12 Zodiaz sign and all the data call on this page through the Database , in this page i there is an one sql query -- (Select Top 1 col from colour order by newid(),Select Top 1 num from number order by newid() ,Select Top 1 days from day order by newid() )
then all data call one by one change ..
when the refresh the page the value of all zodiac is change that is wrong ,,,
so what is the quary that one time in day the value off all zodiac is same next day the value has been change.................................
so please help me /.........
tell what is the process to not data change into the page refresh
Ashwnai
Hi Ashwnai,
You do the databinding in the load event of the page right?
You should do the databinding inside a "Not IsPostBack" like:
Protected Sub Page_Load(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles Me.LoadIf Not IsPostBackThen'Do your databinding hereEnd If End Sub
I hope this answers your question ...
Otherwise please reply!
Kind regards,
Wim
This is not solution of my problem
what is databinding , i am using the datagrid in the pages
so please help me
http://demo.reallianzbussimart.com/allzodiac.aspx
when u refresh the page all the zodiac value also change , but this is wrong
Ashwani
|||
ashwanikumar:
select top 1 days from dayorder by newid()
the emphasized generates random number(guid to be exact), so everytime the page is refreshed the order is random.
hth
|||
Ashwani,here are your queries
Select Top 1 col from colour order by newid()
Select Top 1 num from number order by newid()
Select Top 1 days from day order by newid()
if you are keep calling to storeprocedure / query by refreshing it. IT will give you an different result on every refresh click.
Remove order by NewID() because everytime it will generate GUID random ID.
Select Top 1 col from colour
Select Top 1 num from number
Select Top 1 days from day
Please send me the table with data atleast with three rows.
Then i can give you better solution.
DB Master
http://codeproject.wordpress.com
No comments:
Post a Comment