|
Hellow..
I would also like to design a website .Where people register then go to a exam page where
10 questions ( randomly comming from the database)
4 options for each question (radio Buttons , Both comming from database)
I need to make it in Vs-2008 ASP.net and the Database should be Microsoft -sql server .
I have created the login pages with the login control from the toolbox but now i am stuck as how to bring the questions and answers from the database ?i also want to set up a timmer in that, so that i can calculate the result and save the result in the database
The login control create a MDF database. can I use this same database For my question and answers? How can i impliment this?
Could you please help me with this?
Thank you
|
|
|
|
|
1. For bringing questions and answers from database.
You can bring questions and answers by using questionid.
Assign unique ID to each question, and obviously there is
associated answers. Your database structure might look as
follows.
Question Table
--------------
Q_ID (Unique Incremental Integer)
Question
Answer Table
------------
Q_ID (Referred from Question Table)
Answer
So, each question is identified by Q_ID.
2. If you use timer then fetch fresh question from database on timer tick, and
update on front-end.
3. You can surely use MDF file that is generated from your login control.
(The condition is it must contain questions and answers)
Use following connection string to connect to mdf file.
Data Source=.\SQLEXPRESS;AttachDbFileName=e:\data\Customers.mdf;Integrated Security=True;User Instance=True
For more information on how to connect to mdf file try following link...
http://msdn.microsoft.com/en-us/library/ms247257.aspx[^]
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
As soon as I see 'Examination System' I think 'homework', especially when it's the persons very first post. Th epoin tof these questions is to help you when you get stuck with a specific problem, we're not here to write a complete system for you!
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
I would like to know how to add data into 2 tables in one procedure. I have table1 and table2. Now i insert data to first table, but i have problems with inserting ID(auto-increment) of first table into second table.
I have procedure like this but it doesn't work:
<br />
ALTER procedure dbo.insert_test<br />
<br />
<br />
@value1,<br />
@value2,<br />
@value3<br />
<br />
as<br />
<br />
declare @table_1 int<br />
<br />
insert into table1(value1,value2,value3) values(@value1,@value2,@value3)<br />
<br />
SET @table_1 = (SELECT table1.ID FROM table1) --> table1.ID is primary key<br />
<br />
insert into table2(table_1, value2) values(@table_1, @value2) --> @value2 is same as for table1<br />
Thanks
|
|
|
|
|
First, there is a database forum here which would have been a better place to ask this than the ASP.NET forum don't you think?
I'm assuming you are trying are trying to join these two tables via the table_1 column.
SET @table_1 = (SELECT table1.ID FROM table1 )
This will only return the first id in this table, not that last one inserted. This what you want.
SET @table_1 = SCOPE_IDENTITY()
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
hy,
i have a requirement in which i ahve to open a pop up form main page...and soon as i click on save on the popup...the particular record that i inserted into the popup should automatically be shown in the dropdown in the main page...this should happen ithout any event being fierd in the main page.
thanks and regards,
raghvendra panda
|
|
|
|
|
|
|
Thnks A lot man....itz working fine
|
|
|
|
|
Hi,
I want to use the Cascading dropdown control that populate from SQLServer database tables.
If any body have it's working code so please help me.
Thanks for your reply
Regards
Ratnesh Nirmal Bharos
( Web Developer Asp.net, C#)
|
|
|
|
|
|
|
I'm trying to validate an image before uploading to the server. Basically I want to validate the image width and height before uploading. I have seen this done before using javascript but thought maybe someone would have another solution?
ASP all the way
|
|
|
|
|
Well if you want it done prior to uploading then I'm afraid that javascript is your only method. Can't access a file server side without it being there after all.
Of course people disabling javascript would get around this so, you should really have a redundant check on the server side anyway.
|
|
|
|
|
thanks i see the problem. thanks for the advice tho.
ASP all the way
|
|
|
|
|
In Asp.NET you can check image file's height and width
before uploading it using following code.
Dim upBmp As Bitmap = Bitmap.FromStream(FileUpload1.PostedFile.InputStream)
Dim upWidth As Integer = upBmp.Width
Dim upHeight As Integer = upBmp.Height
But for that you need server trip.
So best way is using javascript.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I'll try this method and see if it works for my scenario. thanks
ASP all the way
|
|
|
|
|
hi,
i have a we application and i have different settings for this application,
now i need multiple web.config files in the application,
how i can reference to those web.config files melodramatically at run time that which one's settings is going to be used this time,
can any body explain it please,
|
|
|
|
|
|
The usage of multiple configuration file makes the application more secure and manageable.
In the following tutorial you can learn how to use multiple web.config files in your application.
Regards,
Jamil
|
|
|
|
|
Hi, I want to return selected items (check box list) on button click of a user control to the parent page.
How do I do this ? The checked items would be in form of List<>.
I have made the user control but don't know how to pass an input id to it to fetch the records and on button click, return them.
|
|
|
|
|
Just make one public method of your user control
which returns List<> items [Contains selected items].
That's it. You need to access that particular method once
button click is over.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Update:
Ok, I created two public properties, now I want to return the selected checkbox items in the checkbox list and return them on button click so I used a foreach, not much sure about my approach.Here is how its looking now. How to bind the results with parent page gridview on user control button click ?
public partial class assets_WebControls_ftExclusions : System.Web.UI.UserControl
{
private int id;
private ftExclusionsList myftExclusions;
public int ID
{
get{return ID;}
set{ID=value;}
}
public ftExclusionsList selectedExclusions
{
get { return myftExclusions; }
set { myftExclusions = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
cblExclusions.DataBind();
ftExclusionsList myExcluList = ftExclusionsManager.ftExclusionsById(ID);
if (myExcluList != null)
{
if (myExcluList.Count > 0 && myExcluList != null)
{
foreach (ftExclusions ex in myExcluList)
{
cblExclusions.Items.FindByValue(ex.excluId.ToString()).Selected = true;
}
}
}
}
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
ftExclusionsList myFTExclusionList = new ftExclusionsList();
foreach (ListItem li in cblExclusions.Items)
{
if (li.Selected == true)
{
ftExclusions myftExclusion = new ftExclusions();
myftExclusion.ftExcluId = Convert.ToInt32(li.Value);
myftExclusion.excludesc = li.Text.ToString();
myFTExclusionList.Add(myftExclusion);
}
}
selectedExclusions = myFTExclusionList;
}
}
modified on Friday, May 28, 2010 7:53 AM
|
|
|
|
|
Hi
I want to make my website url like
www.websitename.com/username
Just like twitter in which we have
twitter.com/username
How to achieve this
Please help
Thanks in advance
|
|
|
|