|
this the same problem to me any solve????
|
|
|
|
|
Hi,
I want to add tablerows and columns on every button click in asp.net(C#.net) for existing table, after that i want to save all these rows data in the database. please help me out How to create table rows and columns dynamically and save in the database. Client will not allow the javascript in the pages.
Thanks in advance, and help me out.
-Murty
|
|
|
|
|
let say you have table name 'tblData'.
Now if you want to add table row then create table row by
TableRow tr = new TableRow();
Create table cell and add it to table row
TableCell tbcell = new TableCell();
tr.Controls.Add(tbcell);
Then add it to your table
tblData.Controls.Add(tr);
|
|
|
|
|
Thanks also from me!
I was wondering about that the other day, but then got distracted.
You have reminded me and solved it in one go
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Thanks Dalek Dave
|
|
|
|
|
below code is default.aspx
but default.aspx was called so many time.
jungJava() function is called always and don't stop.
i don't know why....
////////////////////////////////////////////////////////////////////////////////
<script type="text/javascript">
function jungJava()
{
debugger;
alert("called");
document.getElementById("txtTest").value = "11000";
count++;
form1.submit();
}//function jungJava()
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="hidden" id="txtTest" name="txtTest" value = "1" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
<script type="text/javascript"> jungJava(); </script>
</html>
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Of course it is, you're telling it to.
<script type="text/javascript"> jungJava(); </script>
This is going to run every time the page loads. Then your script submits the form which causes it to reload, which causes the script run, which submits the form, which cause to reload, which causes...see how it goes?
If you want to happen once then trigger it with an event, such a button click.
Also, notice how the code snippet here is formatted? Use it next time
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi folks
I'm building this registration system in my asp application and I've got a question. I'd be happy if you provide me with an answer.
I have a code block to check if the entered email exists or not. I've used executeScalar method here. so when the email exists I receive a ONE. now I made an if block telling the machine to print an error then and stop the process. because I'm putting the main process (saving user to DB) after this checkpoint, HOW can I stop the code blocking from process(going on to insertation) if email exists before?
I mean I want the transaction to stop if email exists and this requires I think something like break; or ... . can you help me?
Proper Prepration Prevents Poor Performance! h
|
|
|
|
|
I think this validation is better to do on DB.
But, instead
break use
return
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
modified on Sunday, May 23, 2010 6:05 PM
|
|
|
|
|
Hello I'm Developing an Online Examination System using ASP.NET
- I just want to know the best way to store the students answer in the database
is it better to store the Id of the Selected option or the value of it
and What I have to store when the answer of question is text ?
- how to display the quesitons depending on their type for example :
Multichoice with one answer [Radio list box]
Multichoice with many answer [check list box]
regards ,
You have To Search About The Truth Of Your Life
Why Are you Here In Life ?
|
|
|
|
|
1. Better is to use ID of the selected option which is selected answer of one question.
2. If question is multi-choice then use CheckListBox otherwise use RadioListBox.
Take and look Visual CertExam, you will get idea how will looks and works your application.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
thanks a lot I appreciate your answer
well I have another question
I want to build this application using either ASP.NET or ASP.NET MVC 1.0
how can I take the decision in using one of them especially that I need to learn MVC before I start
what are the points that I have to take in consideration when taking this decision ?
You have To Search About The Truth Of Your Life
Why Are you Here In Life ?
|
|
|
|
|
Hi..
I know the simple concept but i dont know ...
I have two drop down list in client side..
First Drop down should load automatically when page load...
Now i want select some values in first drop down list and its based up on value automatically load in second drop down list...
i know the server side coding.. but i want client side because i have reduced post back event..
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title>
<script type="text/javascript">
showDropDown=function(){
dds=document.getElementsByTagName("SELECT");
for(i=1;i<4;i++){
dds[i].style.display="none";
}
dds[dds[0].selectedIndex + 1].style.display="inline"
}
</script></head>
<body>
<select onchange="showDropDown()">
<option>Milk</option>
<option>Coffee</option>
<option>Tea</option>
</select>
<select style="display:none">
<option>chocolate</option>
<option>strawberry</option>
<option>skim</option>
</select>
<select style="display:none">
<option>black</option>
<option>columbian</option>
<option>arabic</option>
</select>
<select style="display:none">
<option>iced</option>
<option>hot</option>
<option>green</option>
</select>
</body>
</html>
modified on Sunday, May 23, 2010 12:36 PM
-- Modified Monday, August 2, 2010 2:04 PM
|
|
|
|
|
thanks for reply.....
i want to connect database in both drop down....
can u send me the sample for that
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
Hi,
I have search facility on my web site. I am using .NET framework 3.5 with ASP.NET C# and I would like to display an image on the page. The image i am retrieving is directly from a web site e.g http://somewebsite.com/images/image1.jpg
I am trying to use the <asp:image> control and tried to set the Image URL to the web address but it doesnt work.
I know how to display the image from a web server when using Windows Form by using system.Net and using http requests but i dont know how to go about implementing this in web site.
I would appreciate if somebody could assist me with this?
Thanks,
|
|
|
|
|
How are you setting the image? Setting the src property for the image tag is all that is necessary.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I am using <asp:image> control and I am setting the image URL to the web address like this:
String webURL = System.Net.HttpWebRequest.Create(Title.ImageUri.OriginalString).GetResponse().GetResponseStream().ToString()
Image1.ImageURL = webURL;
if i view the source then the src is set to this which is wrong:
img id="ctl00_ContentPlaceHolder1_Image1" src="System.Net.ConnectStream" alt="DVD" style="height:122px;width:122px;border-width:0px;margin-left: 73px" />
Any advice on the above?
Thanks,
|
|
|
|
|
What you are doing is assigning the ImageUrl property the type name, System.Net.ConnectStream, because you are calling ToString() on the Stream object returned from GetResponseStream(). Why did you even think this was necessary or the proper way?
Title.ImageUri.OriginalString is all you need.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
Yes your right, i only need to specify the OriginalString part. I solved the problem by using the debugger after i replied to your previous message.
When i was developing a Windows Form application I was using HTTpRequests etc and assigning the values to a picture box.
Thanks for the help.
|
|
|
|
|
SALAM,
i use C# with ASP.NET.
I CREATE A TABLE IN MY PAGE ASP AND WHEN A USER INSERT DATA (int num,smalldate date,varbinary fichier)ON THE TABLE AND CLICK A BUTTON "DEPOT DOSSIER",so data will add to database.
my problem how to insert image and date and num from table in asp page to databse sqlserver .
and this what exactly i want to do with 2 photo: link to first photo http://pics.imagup.com/ano1/1274640272.jpg
and when the folder is created it must be like this: link to second photo
http://img62.imageshack.us/img62/5113/administrateurcert.png
Note: images show like a url in the ASP page.
can i use gridview in some case?
SALAM .
modified on Sunday, May 23, 2010 2:38 AM
|
|
|
|
|
This[^] shows how to insert images to database.
ihbos wrote: can i use gridview in some case?
GridView is for display. Manipulating the data and inserting or retrieving from a database is separate.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thank you for your help
but i want to know how i can add data (string or date or int) which user insert into my table page ASP to my database table sqlserver .
Thanks and Salam.
|
|
|
|
|
There are so many examples of how to insert data into a database in books, articles, online, etc. Are you saying you have never seen any example? If so, then you need more help than we can give you here.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi,
i wish to create a menu like this Site: http://www.dhgate.com .
are there component to make it?
please help me .thanks a lot.
|
|
|
|