- Strength to Increase Rep
- +9
- Strength to Decrease Rep
- -2
- Upvotes Received
- 25
- Posts with Upvotes
- 24
- Upvoting Members
- 15
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: You should also stear away from inserting code just like that. Look into adding parameters: [code=cscharp]SqlCommand comm = new SqlCommand("INSERT INTO desg VALUES (@txtsno, @txtdesg, @txtbasic)", connection); comm.Parameters.AddWithValue("@txtsno", txtsno.Text.Trim()); comm.Parameters.AddWithValue("@txtsno", txtdesg.Text.Trim()); comm.Parameters.AddWithValue("@txtsno", txtbasic.Text.Trim());[/code] This prevents SQL Injection. | |
Re: You're a little late serk.. :) Aug 24th, 2005 | |
Re: aswhat the problem/error explains, you might be passing too many values into the function. check to see that you are calling... wait a second.. read your public void line: [code]public void Insert(string strName,string strCName,int nWeekHour,string strPassword,string strEMail,out int nAlreadyIn)[/code] The problem with this is a couple things. what is "out … | |
Re: I am a Class ASP coder myself, but am learning .NET. In my stand point, asp was easier to get simple tasks done, but the more complicated ones .NET does in a flash. Just like PHP, ASP Classic had to use loops through queries, use if statements, and then display … | |
Re: Here's some info on commands: cmdSelect.ExecuteNonQuery() -- This executes queries that don't return rows, like deletes, updates, inserts, etc. -- Returns a number of records updated, if you set it to a variable: -- Dim intRecsUpdated As Integer = cmdSelect.ExecuteNonQuery() cmdSelect.ExecuteScalar() -- Retrieves only one record/column/entry, and always the first … | |
Re: You bring up a post that is almost 9 months old and cutting down the credibility of everyone that uses this site? Kinda retarded if you ask me. Next time post and see if someone is here to help you. For some info, use this tutorial and next time be … | |
Re: to find the physical path, you have to know where it is based from the root of the folder. THen you can create a dummy aspx page to find your virtual path. THe dummy page will contain: [code]<%= server.MapPath("/vdir/") %>[/code] This will show you the physical path to the vdir. | |
Re: Are you sure the page isn't cached? If the page is cached, then it isn't finding the cookies, just using the settings on when they found them in the past. | |
Re: Isn't it just easier to bind your employee id as the Value of the Dropdownlist item, and their name as the Text of the Dropdownlist item. You can receive the name of the dropdownlist by: dropdownlistname.SelectedItem.Text And the value of the dropdownlist selected item by: dropdownlistname.SelectedItem.Value So a simple: Dim … | |
Re: Yes it is possible Slade. You need to ask yourself, how did the querystring get there? A URL is read only yes, so you cannot "edit" it through commands on the server. Just think about it a bit.. you got the querystring when you submitted the form... | |
Re: Yup, you cannot populate a DropDownList like that. Code for that is as follows: [code]Dim conn As New SqlConnection( connection ) Dim cmdSelect As New SqlCommand( ""Select flightnum from Air_flight", conn ) Dim dtrReader As SqlDataReader Try conn.Open() dtrReader = cmdSelect.ExecuteReader() if dtrReader.HasRows then ddlflightnum.DataSource = dtrReader ddlflightnum.DataValueField = "flightnum" … | |
Re: Read up on Primary keys and Foreign keys. This is how you relate the tables together with a trigger to delete all childrows or update all childrows when the parent row is modified or deleted. This is all done on the server, so if you wish for an explanation of … | |
Re: That requires too much. Your best bet is to just change the picture through javascript. [code=JAVASCRIPT]<script type="text/javascript"> <!--// function chnge() { document.getElementById("adRotator").src = "newimagepath"; //If you wish, put all your images in a folder //that have similar names like: //img001, img002, img003, img004 //Then take a random number, and check … | |
Re: two effective ways to do this.. You can create a gif file that is transparent except for your watermark and create it the same size, or close to, of the default image. Then on your page, set the background of a div to the default image, and the size of … | |
Re: If you still need it, this will delete all rows from your table, except for your head row. [code=javascript]var table = document.getElementById("tableid"); //or use : var table = document.all.tableid; for(var i = table.rows.length - 1; i > 0; i--) { table.deleteRow(i); }[/code] Change the red "0" to "-1" if you … | |
Re: register a script for an "Alert": [code=C#] string str = "function () { alert('OMG ITS me'); }"; Page.RegisterClientScriptBlock("nameofscript", str);[/code] | |
Re: Page.IsPostBack is for forms that are runat="server". It is mostly used for same page validation, same page operations, ... anything really same page! It is also used to help keep bandwidth and rendering times down. The main reason why people use IsPostBack is to stop taping the databases everytime a … | |
Re: Noonza, To do a search in a database, all you have to do is create a user control like Datalist, DataGrid, or Repeater and bind it to the datasource. If you want to search for a keyword, create a textbox that posts to the server. When a user enters in … | |
Re: is MM_dbtest_STRING declared, and set? Sounds like it isn't. | |
Re: The folder is more for database files (SQL, Access, XML, etc.). If you are trying to put a database file in the folder, just create a new one there or detach a database from your server, move it to that location, then reattach it. All easily done with Enterprise Manager. … | |
Re: well, you can use checkboxlist but it doesn't work like radio buttons do. The user will be able to select multiple ones if you choose checkboxes instead of radio buttons. But if you decide to do checkboxes, use javascript to uncheck the other boxes in your group. [code]<script type="text/javascript"> function … | |
I posted earlier on this site for help on where to set a command when a user session timesout. I posted this in the global.asax file: [code]Imports System.Web Imports System.Web.SessionState Imports System.Diagnostics Public Class Global Inherits System.Web.HttpApplication Sub Application_Start(ByVal Sender As Object, ByVal E As EventArgs) Application("CurrentUsers") = 0 Application("TotalSessions") … | |
| Re: replace the querystring yourself if you wish. When the page gets requested, set the current url to a string. Then replace all the "coded" parts with the real parts! |
Re: ASP.NET does not allow this as far as I know. Your only options are ActiveX and Java Applets. ActiveX mostly runs on IE but Java runs on the other browsers, as you want it to. | |
Re: You can purchase a prebuilt one or have one built custom for you. It's a process that would take about 3 days and have a control panel that would allow you to add questions for certain surveys/tests, view results based on those tests, and set certain keys for certain users … | |
Re: Hey buddie, you need to put your first part of your data within an IsPostBack portion. The reason why it is becoming the old data is that when you postback to the server, it still refreshes the page which plays page_Load once again, where you set the t1 and t2 … | |
Re: What the previous post gave you was a way to know how many people are online at any given moment, however, it is very unstable as you are not guaranteed to trigger Session_OnEnd, and if you look into it, it's normally not fired for beginners. I would suggest, just like … | |
Re: This has to do with CSS. On the td row, apply this style attribute: [icode]style="position: relative;"[/icode]. Then on your calendar, apply this attribute: [icode]style="position: absolute; z-index: 1000;"[/icode]. This will make the calendar be in the same row, and be "above" the other elements. You can then decide how far down … | |