Web Forms :: Lock The Controls / Different Work Centers Assigened To 3Text Fileds On Webform?
Oct 29, 2010
I have 3 different work centers assigened to 3Text fileds on my webform DesignDate,CollectDate,TMSDate ).the process of job is likely to be DesignDate->CoolectDate->TMSDate.when i complete the Design process i will go for Coolect filed and put a date(which indicates particulr job due date)when i am moving from Current work center to nextwork center previous work center should be locked .is it possible to to do locking the textbox if already date exists in that field else allow to enter for text.My text fields are txtDD,txtCD,txtTMS.
Problem -I have used simple mvc application. and also added webform into mvc application.and it is working fine. but when i used session object for sharing data between mvc and webapplication. it is not working. I have put Session["logon"] = "logon"; object into mvc controller and when i access this into webform then there is no value in session object.
I am using a server control on a single web.forms page. I have to use this control on a web.forms page since its a server control, although this is actually a MVC project. So I created a web.forms folder and put my new page in it. I then copy the example code from the signature control. I get the following error:
The base class includes the field 'ctrlSign', but its type (WebSignatureCapture.SignatureControl) is not compatible with the type of control (ASP.signaturecapture_signaturecontrol_ctlsignature_ascx).
I know the code works because if I removed the ID attribute from the server control, it no longer gives me this error and my control renders. But I need the attribute for the ID so I can perform is post event
I am using this signature control. Here's the web.forms code...
i develop a c# windows application. My database is sql server 2008 exp. i want lock single row for user select it for update. for example;
userA - Connection a (connection id 52);
user select a single row (select * from t1 with(rowlock?, updlock?,or what) where id=1) and bind data to form fields (texbox, checkbox,combobox etc.). (there is no problem)
userB - Connection b (connection id 54);
userB can select all other rows from t1 (where id=2 or 3 or anything) but not id=1. when userB select * from t1 where id=1 system generate an exception with (you cannot select this row because it is updated. Updated users connection id is 52.)
when userA (connectionid52) close form or commit changes then userB can select id=1.
i am read few documents (transacions, rowlock,updlock, concurrency violation optimistic,pessimistic) but i couldn't understand.
in webform 1, i have search button when i click its open webform2 and there the gridview.
I want when i click the link in gridview in webform 2 then it close webform 2 and change the datasource parameter in webform 1 without open the new window (still same window)
In my Sql Server table, I specified the modifyDate defaultValue to GETUTCDATE(). Now, in my FormView control and SqlDataSource control, do I have to do anything special?
I have a gridview I create dynamically and one of the columns is a checkbox. I need to set an event handler on this control for checkedchanged. everything appears to work fine except for one thing....even though I can see my WebForm controls they are all null..(even thogh I know they are not) So I basically cant do anythign to the controls in the event handler. Here is teh code I use to create teh dynamic column in the gridview.
EtscUtilsUI.ALMSSECSRV.EALMSAppRoles ealmsapprole = new EtscUtils.EtscUtilsUI.ALMSSECSRV.EALMSAppRoles();//Thsi is the webform code behind partial class. CheckBox chk = new CheckBox(); chk.ID = _columnName; chk.DataBinding += new EventHandler(chk_DataBinding); //Attaches the data binding event. chk.AutoPostBack = true; chk.CheckedChanged += new EventHandler(ealmsapprole.Dyn_CheckChanged); container.Controls.Add(chk); chk.Enabled = true; This is the code for the event Handler internal void Dyn_CheckChanged(object sender, EventArgs e) { string err = ""; try { if (lblAppID.Text != "") }
that label come back as null event though a previous event set its value successfully if I try to reference the gridview itself I get the error Object reference not set to an instance of an object.
I am Chandan Pednekar an IT student completing my final year. I am developing a data driven website for my final year project. I have written a code behind file in c# which takes a value from a datagrid to retrieve values in textboxes for further updating.
I have coded the datagrid on another page. My problem is that, even when I click update(on editEmp.aspx) I straight away get redirected to the datagrid page(manageEmp.aspx I have redirected after successful update) but the database just doesn't gets updated. I am using sqlCommand Object with executeNonQuery method.
I don't even get errors. It just gets redirected and the database isn't even updated.
I have page with several textboxes, dropdowns, and check boxes on it. When I click my update button and the update happens, at that point all of the textboxes on the page are locked, I cannot click into any of them. The dropdowns and check boxes still work.
I have two roles admin and member. In my application, admin can manipulate most of the member data. I know that in forms authentication a user can be unlocked like,
MembershipUser user = Membership.GetUser(clickeduserName); user.UnlockUser(); Membership.UpdateUser(user);
My questions are,
How to lock a user in forms authentication? Why is MembershipUser.IsLockedOut Property set as ReadOnly? Is it not the right way to LockOut people as an administrator?
I need to know how many ways I can lock a file? Suppose a process has opened a file and reading or writing it, by this time another process try to open it and read or write, how many ways I can impose lock level on that particual file? So, that the data remain consistant.I'm using VS 2005 and OS is Windows XP or Windows 2003 Server.
I have a FormViewwith several bound textboxes whose values (text) are generated in code. The textboxes are bound to the data with Bind("<FieldName>"). Because there values are generated in code, I'd rather not let my users change their values. I have tried making them read only. However the values of the text boxes did not update when the form was updated. I tried disabling the textboxes but that grayed them out. I tried replacing the textBoxes with labels while keeping Bind("<FieldName>") but that didn't update either.
(1) Am I doing this right? (2) Is there any way to lock the value of a text box without graying the textbox?
I am trying to find an efficient way of displaying images (about 140x140px) in a webform. We cannot use paging, so we need to display all these images in the same webform.I noticed that facebook (and other sites) lets you display all your images in one page. For a profile qith about 1000 photos, facebook somehow downloads only enough so that the visitor can see images on the screen. Once you scroll, it seems to only download enough so that the visitor can again see something on screen. It works like a good text editor.... instead of displaying a huge file onscreen (like notepad does) and freezing, it only displays enough for the reader to see.
I am trying to create a recipe system that will pull material amounts from an already built inventory database upon request for testing purposes of the different recipe runs. What is throwing me for a loop is that each time a user will request a recipe comparison they will have a different number of recipe trial runs for comparison purposes. In order to do this I'm guessing you will need to generate a gridview-like control with a dynamic number of columns which would be specified on a web form page prior to arriving at the recipe formulation page which will contain the control for the recipe formulation. As a result the user will have different columns and rows on this formulation page, with the rows being a static number of 30 (30 being maximum amount of ingredients to include in each recipe). The columns will contain the recipes to be compared, i.e. ProductRun1, ProductRun2, ProductRun3, where the number of ProductRunX will be determined by user input. So the user when they come to this aspx page will be presented with a blank editable grid of X columns by 30 rows deep. The left-most column will contain the ingredient names in a drop down box for users to select to input into their recipe and the rest of the columns will be editable fields where the user can type in the amount of each material to be used. The setup will look roughly like this:
So my question is how would I go about tackling something like this and what controls would I use. All of the forum posts around the internet show the GridView control being tied to data in a database already and not having the ability to have a fully blank and editable table upon the page loading so that it can accept user input. Another wrench into the situation is that the column numbers can vary. What control would be used in this situation or would it be better to use just a repeater of textboxes to build this type of control? Another thing is once the control is built how can you pull the data from such a control with the intentions of entering it inside a sql server database?
I tried to put a ListView onto a webform but got an error right after that:
Error Creating Control - ListView1
The 'CssClass' property cannot be set declaratively.
BTW, does ListView support horizontal/vertical scroll bar? As I might have about 50 records in maximum, so need to have horizontal and vertical scroll bars. But do not need paging.
I am using IE8 browser. I would like to Lock column header of gridview in IE 8 Normal View. I can lock in In compatibility View . I could not Lock In Normal view of IE8 Browser. I have developed Asp.net Application(c#) usingNote: Gridview column Header is dynamically loaded as per Client Requirement.