I have simple task however I have not found a real solution to my problem.
I am trying to build my own light weight datagrid control. I don't need the functionality for Database stuff Data Grid provides. Anyhow my data grid will add some text boxes when a user click the Add button which is isolated from the datagrid. So here is my problem. If i use the asp.net table it will lose all its statehood once it does a postback which is not what i want. Im not sure how i can override that, can you ?
putting everything into a session does not work cuz when the update of those controls is complete only when they click update which again causes a postback. Can i possibly change the AutoPostBack in the button and keep that button on the client side and perform the event on the client.
second im not sure how to add asp controls to an html table, and how to reference that html table in asp.net similar to GetElementById("id") provided in java.
The only controls that keep state is the ones that put data in the session state themselves. A table is not that kind of control. If you create the table dynamically, you have to recreate it each time the page loads.
If you want a button without postback, just use a plain html input with type="button".
I am a beginner in dot net.
I read one article - "The ASP.NET Worker Process " from codeproject.com.
I have some questions to ask
Currently i am working on a software (ASP.NET and C#) in which there is a module which uploads a file on server and process it. Problem is when i upload a file of more than 6 mb. the file get uploaded on server but after some time i am redirected to login page. (though Sesion time is not expired).
I am not getting why this is happening. Does worker process recyle affects the session data.
I load all the data in a DataSet and this dataset is in session. Can i have some other approach to solve this problem.
Currently I am working with the project which needs time format in 24 hours format(in ASP.net & C# langauges) and other features but i am facing problem with them. I have described the problems below in detail to easily understand, so please let me know if you know...
1> How to convert 10:30 pm into 22:30(24 hrs time format)?
2> I had used listbox with multiple selection for display of my item. Following is a example.
1. Item One.
2. Item Two.
3. Item Three.
4. Item Four.
5. Item Five.
Now at the time of record insertion I had select Item Two, Item Four, Item Five. In database I will store its ID with comma delimiter says 2,4,5.
Now in the edit form I want to display selectionbar on old previous item in listbox. so how shall I ?
I had used below code:
for (j=0; j < IdSplit.Length; j++)
LstBox.SelectedValue = IdSplit[j].ToString();
This will shows selectionbar on last id only. In our example it will shows selectionbar on Item Five, 5.
3> I had created checkbox dynamically with below statement FOR EACH Module.
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]' value='A'>Add
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]' value='E'>Edit
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]' value='D'>Delete
lblCheck.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]' value='S'>
Search Say my Module_Id = 12
After form submit, I got value by form.querystring["chk121"]; form.querystring["chk122"];
but I want to use foreach loop for checking of for loop. Because there are more then 50 modules. so how shall I do this ?
Any help, advice or pointers on this matter would be highly appreciated.
my problem goes like this.
i had placed some 5 controls on my web form so they got labeled TextBox1,TextBox2....now i put the controls in a table.then i changed the names of the text boxes to logical names like TxtFirstName and so on.now the problem is that in the code for the page i cannot find TxtFirstName by pressing ctrl+space.instead what i find is the same old TextBox1.so how to solve this problem.
I have a problem with manipulating data in datagrid. My code don't delete a row from the database just from the datagrid
Dim cmdr As SqlCommand = New SqlCommand(strQry, conn)
adpt1 = New SqlDataAdapter(cmdr)
.DataSource = Ds1
.DataMember = Ds1.Tables("MyTbl").ToString
Private Sub DtGridCurrentHw_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
Well Datasets are connectionless collection of data i.e. you don't have database connectivity if u r using dataset. You have to connect to database and delete the required record. In other words you have to execute a delete command using ExecuteNonQuery or ExecuteScalar (SQLCommand). And then bind the datagrid again..
I need to edit text in tree node like editlabel in window form. I try to use java script to show input text at the position of treenode. and when user input data, I will set the input string to treenode.text but, I can't find the X and Y position.
Can any one help me.
In the ASP.NET, the NameValueCollection[^] class is used to contain the form data, so if want to access an input text element with the same name as another one, you can use the sample code as below:
i have a problem with insertion.i have written a stored procedure for inserting in database.the procedure is working fine and i checked it thru sql query analyzer.but whenever i run it thru code i get an error called 'Object must implement IConvertible interface'.what could be the problem and how to solve it.
Hi,im having trouble accessing a X509Certificate from a asp.net webpage,the exact same code runs from a windows form but from the webpage the store has 0 certificates. Im using wse2.0, i gave aspnet acc full-control permission to the certificate.Any help will be appreciated.The error i get is System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index at Microsoft.Web.Services2.Security.X509.X509CertificateCollection.get_Item(Int32 index)
I am trying to execute a Batch file from within my ASP.NET application. I have tried providing access to ASPNET accout and also Full Control to the entire account. But the batch file is not being executed. Is it possible to execute? Is there any thing which I need to specify?
Last Visit: 31-Dec-99 18:00 Last Update: 13-Mar-14 5:27