|
|
Not sure if this belongs in the VB section or here, but here goes.
I'm just learning the .net language and I'm really enjoying it, but I've hit a roadblock.
I can't seem to get the SQL part of it going. I can't figure out how to programmatically attach to a SQL database and insert, delete or edit rows. I can make the tools do it, but not just within the code.
For now, here is what I'm trying to do. (eventually I'll build on this.)
Right now, I have a page built with nothing more than three textboxes and a button. I have a database called 'testdb' with four columns: first, second, third and control. Control is marked as a primary key and identity field. First is of type 'int', second is of type nchar(10), third is of type datetime and control is of type int.
All I want, is that when you press the button, a new record gets created in the database where each of the values you entered in the textboxes gets put in the database.
Seems simple enough, but I can't quite figure it out.
Thanks.
|
|
|
|
|
|
Sigh.
I'm still not able to make it work.
I've added the code that is listed in the web.config and the button, but where do I put the stored procedure stuff?
I'm also thinking that it somehow has to link up to my database somehow, but I don't see where I enter the information as to what my database name is. (I'm assuming that I need to create columns with the names 'name' and 'city'.
Sorry to be so obtuse here, but I'm really new to this stuff.
Thanks.
|
|
|
|
|
Can anyone help me with this? It's just driving me crazy. I've been working on it for two weeks now and I can't figure out how to do it and I can't find anyone I know who knows how to make it work. I've been working with the code listed on the webpage and other websites I've found and I can't get anything to run.
I even downloaded the code listed on the page, but when I run it I get :
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
|
|
|
|
|
The default extender sample website works fine on my computer but this one does not work
i am trying to just get the files from a folder so i can easily add images to that folder
any help
my code here
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public AjaxControlToolkit.Slide[] GetSlides()
{
DirectoryInfo ajdir = new DirectoryInfo(@"images");
int s=ajdir.GetFiles().Length;
FileInfo[] ajfiles = ajdir.GetFiles();
AjaxControlToolkit.Slide[] Slide = new AjaxControlToolkit.Slide[s];
int Count = 0;
foreach(FileInfo f in ajfiles)
{
Slide[Count] = new AjaxControlToolkit.Slide("images/"+f.Name+"","","");
Count++;
}
return Slide;
}
|
|
|
|
|
Does anybody know, How can I get ModalUpdateProgress tool kit in ajax???? and how can i use it???
|
|
|
|
|
Niungareamit wrote: How can I get ModalUpdateProgress tool kit in ajax???? and how can i use it???
You can download it from Here.
You can also find the sample code and video for all the Ajax Tool kit control from the same link. For Example , ModalPopup
Hope this will helps you !!
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi,
i have problem in Ajax UpdateProgress . can we use Ajax UpdateProgress inside the UpdatePanel????
|
|
|
|
|
Niungareamit wrote: i have problem in Ajax UpdateProgress .
What is the problem?
Niungareamit wrote: can we use Ajax UpdateProgress inside the UpdatePanel????
Please go through this link
UpdateProgress Control Overview and Read the section "Putting UpdateProgress Controls on the Page"
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
I have introduced the UrlReWrite into my .net web application.
This has caused an issues.
"Cannot use a leading .. to exit above the top directory."
I can not figure out what is cauing this error. Not sure if it is related to Css at all (As it is being mentioned on a number of site for people with the same error) as it does not seem to be the case here.
Any suggestions please?
Thanks
|
|
|
|
|
Hi,
What would be the best way to have live videos on an ASP.NET website? I have read that flash servers can do this. But what would be the alternatives?
On of our client websites are in DNN and they inquired with us if this is possible.
Regards,
Blumen
“Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.”
|
|
|
|
|
Hi Blumen
search for WebVideo.dll
add this dll to framework components.
u will get windows media player,real player and VLC player in dotnet tool bar...
just drag and map the video file path..
regards
Rajeesh MP
|
|
|
|
|
thank you, I'll check it out.
“Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.”
|
|
|
|
|
|
Hi,
I have a website in which users save thier reports but the problem is this after filling up all the information when user clicks the submit button lots of validation process takes place. So in slow speed internet connections they often press submit twice and beacuse of that information gets duplicated.
I want to stop this duplicate entry. For this i tried to disable submit button when user clicks the button and enable it later on after all the processing is done but this doesnt work.
Help me how to do it.
|
|
|
|
|
what you can do is check for primary key violation.
|
|
|
|
|
simple fix for this is to use js to disable the button once it is clicked.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Devesh,
There are multiple option to do it.
You can use JAVA Script to Enable and disabled the button as Yusuf suggested.
You can show a layer (Div)with proper message on you page which will prevent user to some more click on the page.
Event Today I have read one interesting article in CP, hope this may help you
Lock ASP.NET Page and Show Animated Image While Waiting for a Long Post-Back
Cheers!!
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
I need to send message to a specified session, is it possible? (notifier)
Best wishes
|
|
|
|
|
mehrdadc48 wrote: I need to send message to a specified session
what do you mean by send a message to session? Where do you send the message from?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I want to notify a specefied user who I know his SessionID by showin an alarm. I don't want to use notification service
Best wishes
|
|
|
|
|
Try
Dim str As String
Dim i As Integer = 0
Dim cmd1 As New OleDbCommand("select id from table3 where news1 ='" & str & "' ", con)
Dim dr As OleDbDataReader
str = ListBox1.SelectedItem.ToString
con.Open()
dr = cmd1.ExecuteReader
If dr.HasRows Then
While dr.Read
i = dr(0)
End While
End If
con.Close()
Label1.Text = str & " " & i
Catch ex As Exception
Label1.Text = ex.Message
End Try
In this code Str recieves the particular listbox value, bt in query it doesnt works.
i remanins 0
can anyone tell me what am i missing??
thankyou
|
|
|
|
|
parkash_C wrote: Dim cmd1 As New OleDbCommand("select id from table3 where news1 ='" & str & "' ", con)
Dim dr As OleDbDataReader
str = ListBox1.SelectedItem.ToString
this should fix it. You need to set Str before using it in the query.
str = ListBox1.SelectedItem.ToString<br />
Dim cmd1 As New OleDbCommand("select id from table3 where news1 ='" & str & "' ", con)<br />
Dim dr As OleDbDataReader<br />
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|