|
OK - I've been answering someone else on the same front. That's cool.
I'd have a single page to show questions, a stored proc that returns questions a page at a time, and store what answers were given in the viewstate, so if the user goes back and forth, you can reset the answers. The stored proc should always return how many pages are in the set of questions, so that you can tell when you're viewing the last page.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
In your last reply you have told that i can use same page over and over. If my query return 45 rows then as per my requirement i need to display 10 questions on each page.
How can i use same page for displaying all question.
On page load i have displayed 10 question when user click on next link then i fetch next 10 question from db and bind to same data list and when he click on previous then again can i bind the first 10 question.
can i do this way. Is it correct?
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: How can i use same page for displaying all question.
Because each time the page index increases, you ask for the next page of data from your data source, and bind it to the same control that renders the new questions same as the old ones.
rahul.net11 wrote: can i do this way. Is it correct?
Yes, the trick is, you need to store all the answers you were given, and as you're going back to the same page over and over, you can do that in viewstate instead of having to use the session
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your help..
Just one more question.
Can i fetch all question from db or only top 10 question.
I am trying to implement that...
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
I have a gridview, with a text box column bound with it. In text box onchange event, i want to read the value of another column, that is present in the same row.
For example:
I have two fields, Is_Round (values as 0 or 1) and a text box bound column. For each row the Is_round value differs. when a text box value changes based on the Is_round value, i should round and show the new value in textbox, during onchange event.
I also tried with onchange = DisplayVal('<%#Eval(fieldname)%>');
onchange = 'DisplayVal(<%# Eval(fieldname)%>)'
But browser shows syntax error.
Plz advice me.
Muthu
|
|
|
|
|
Try this instead of just Eval, It's what I use in Gridviews:
<%# DataBinder.Eval(Container.DataItem, "ColumnName")%>
Hope that helps
Mark
|
|
|
|
|
Well Dear, I too use the same in gridviews.
Thing is, i must use the value in a js function.!
I have already tried with
onchange = DisplayVal('<%#DataBinder.Eval(Container.DataItem,"ColumnName")%>');
above one did not allow me, to switch over to design view. It showed a message, 'Form Tags are not well formed'
onchange = 'DisplayVal(<%#DataBinder.Eval(Container.DataItem,"ColumnName")%>')'
above one threw me a syntax error, during grid bound event.
Muthu
|
|
|
|
|
Hi all,
I am not asp.net 2.0 callback feature, I just want to know is there any disadvantage with this by means of any performance issue or any other, Can u pls guide me this regarding callback feature.
Thanks in advance.
|
|
|
|
|
Do you mean postbacks ? The disadvantage is that without it, writing web sites would be hell.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hai,
I am having one aspx page containing 3 pages in iframes. I am sending parameters in one page of iframes as querystring. How to get the querystring of that page in different pages of iframes. anybody help..
can we use like this
Response("../main/one.aspx?uid")
Regards
M.Ramesh
|
|
|
|
|
hai,
can we use like this..
Request("../main/one.aspx?Uid")
Regards
M.Ramesh
|
|
|
|
|
here[^]
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a grid view with AutoGenerateDeleteButton and AutoGenerateEditButton set to true and and a Detailview with same sqldataosurce as gridview to allow insertion
So what I want to do is take that deletcommand isertcommand and updatecommand from codebehind using store procedure, how can I do this,plz help me
Or how can I provide to provide commandevent like edit delete and insert from codebehind
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="">]]>"
DeleteCommand="DELETE FROM [ElvsysCategory] WHERE [CatId] = @CatId" InsertCommand="INSERT INTO [ElvsysCategory] ([CatName],[CatDescription]) VALUES (@CatName,@CatDescription)"
SelectCommand="SELECT [CatId], [CatName],[CatDescription] FROM [ElvsysCategory]" UpdateCommand="UPDATE [ElvsysCategory] SET [CatName] = @CatName,[CatDescription]=@CatDescription WHERE [CatId] = @CatId">
<deleteparameters>
<asp:parameter name="CatId" type="Int32">
<updateparameters>
<asp:parameter name="CatName" type="String">
<asp:parameter name="CatDescription" type="String">
<asp:parameter name="CatId" type="Int32">
<insertparameters>
<asp:parameter name="CatName" type="String">
<asp:parameter name="CatDescription" type="String">
|
|
|
|
|
Use ObjectDataSource instead of SqlDataSource
Hope this helps...
|
|
|
|
|
justintimberlake wrote: So what I want to do is take that deletcommand isertcommand and updatecommand from codebehind using store procedure, how can I do this,plz help me
If you want to call the procedures on edit,update,delete button click,
there are events in the datagrid control
update-ondatagridupdating
delete=ondatagriddeleting
edit-ondatagridediting
or you can use the common rowcommand attribute for this.
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
I have developed an asp.net application and i used 'smo' objects to retrive metadata of a database in my application.....it's working fine when i run application... but after preparing setup file and deploying on local server its not retriving metadata......
Please help me to resolve this issue.....
Thanks in advance...
Vijay
|
|
|
|
|
1 - Urgent is not a valuable header
2 - you're not telling us what happens when your app tries to run on the server, what error messages do you get ? Any ? What is the code that fails to work ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How do I put special chars like micro, copyright etc. and superscripts or subscripts
I have a textbox on a webform after submission, I save the text present on an XML file, I tried decoding each speciaal character to its number form like micro = µ and all but I cannot code characters everytime I enter text, and the <sup>....</sup> doesn't work
even if I copy from a word document, and paste, It doesn't work
How do I go about it?
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
i remember ALT + 0169 is used to insert © symbol in a text box..and superscript follows from Alt+0178..and so on..but are you expecting the user to use ALT + 0169 each time to insert a © symbol????
.....
|
|
|
|
|
I tried that ,, it doesn't work!
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
use numpad to enter the numerical, i have no idea why it behaves like that but it works for numpad
.....
|
|
|
|
|
|
I want progress bar with remaining time, how much % completed,how much file size in MB remaining while uploading file.
It should be editable(means I can alter in code as my requirement).
code should be free available.
I will appreciate.
I need hardly for that........
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
good luck. there are some commercial libraries, but nothing free that I know of.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Try this:
http://www.beansoftware.com/ASP.NET-Tutorials/ProgressBar-User-Control.aspx
http://www.aspnettutorials.com/tutorials/themes/progress-bar-csharp.aspx
|
|
|
|