I know that this is easy for those that know but alas this is not me ;)
I have a multi part form that is going to write to a dB.
As a point of reference I can offer [URL](i.e., the quote process) as a model for my project.
I need to write a record on the first page and then use the auto number generated from this to populate the child records with the parent's key field.
What I was hoping to do is write the record and then send the data from the dB to the second form. Iwill then need to repeat this process for the children of the child
I am only moderately familiar with ASP.net
one thing to add is that i am not forcing the user to create an account in order to maje the initial inquiry, only if they wish to reaccess theinformation at a later date.
Dim query as String = "Select * from openquery (devbook, 'SELECT wb.arrival_time FROM web_bookings wb ')"All I need is to convert my arrival_time into a datetime field in the query
i am implementing a update query module.i am displaying all fields from a table for a term searched. well now i am implementing update option for the record which are displayed, i have like 70 columns in my table, and i want to know how to restrict some selected fields to be only read only while the form can be updated ?Like if user select to update a record then some selected field such as "Timestamp, UID etc some selected fields" remains READ ONLY !
I have a custom user control which contains a asp hiddenfield object. The value of this hidden field is being set using javascript and I have verified that the value is being set properly. When a postback occurs the new value is not being saved and I cannot access it in my code.
I believe the problem is because the user control is not saved in viewstate and therefore the hidden field value is not saved accross postback. How can I make the hidden field save its value? I tried accessing it from the early page cycles and still no luck.
in my application (asp.net) i have a filed ( phone code) and it contain a text box. and i want to restrict the user to enter only 4 letter after that the cursor should not print any character how can i write the code
I have in my database the News Table which consist of => Id, Title, txt . I need to be able to get a description text from the whole text which exist in txt Field , but without any codes like <...> , just a pure text !! how can I do this?
I have an old database that still contains depreciated Text fields. I need to pull from these fields and display the results. You would think this should be easy... First my select statement caused a problem:
Code: SELECT DISTINCT ..., CustomerInstructions, ... FROM Orders where CustomerInstructions is a Text field.
The error I get: "The text data type cannot be selected as DISTINCT because it is not comparable." A quick search shows I can cast the text field as a varchar(max).
Code: SELECT DISTINCT ..., CAST(CustomerInstructions AS VARCHAR(MAX)), ... FROM Orders
Now I get an error while trying to load the instructions into a text box: "Specified argument was out of the range of valid values. Parameter name: index"
Not sure what the problem is here. I have text and a text box. What's with the "out of range" crap?
I have a few field in my entity that i wish to be non-editable. Looking in the docs it seems like "EditableAttribute" would do the trick. However this is only 4.0Just wondering if there are other attributes that would have the desire effect. So be clear, i have a field called "DateRegistered" i wish to display this as string not text field using "Html.EditorFor"
I want to edit an user.I dispay the corresponding data(username, email,..etc..password, confirmation pass)The problem is that those password fields are empty.Q: When i display data in the formthe two password fields are empty. How can i make them contain data?
I am using asp.net-mvc 2 <div class="editor-label"> <%: Html.LabelFor(m => m.Password) %> </div> <div class="editor-field"> <%: Html.PasswordFor(m => m.Password)%> <%: Html.ValidationMessageFor(m => m.Password)%> </div>
I would like to know how can I easily customize my detailsView that when it is in Create mode ID field should be invisible I can rememebr that it was sth like visible = <% code here ... (IsCreated ??) here is an example:
I have made an entry field required somehow but I'm not sure how. When editing a tag, the tag owner entry field should be able to be empty.I have set "allow nulls" in the database table:Does anyone know how I can fix it? To be clear, I want the above form to be submitted without requiring a value for tag_owner.
Say I have a DetailsView with a bunch of fields, and I want only certain kinds of users to edit a few of them. They're too few to split them into another DetailsView, so what I'm thinking is to find some way to only allow a user to edit them based on some code-behind logic, effectively making them read-only at will.
I feel it's important to mention that the fields are both TemplateFields, not normal BoundFields with ReadOnly properties. For some reason the required functions don't jump at me from reading the documentation. Oh and I need eveyone to see their specific values, I just want to restrict edit access to them.
In the below code when I remove the optional end date and click save it should just take the value as blank, but it doesn't
when I remove the date and click save it saves but still shows the same date as before...when I make it to null it should remain null...how do i do that
I have a simple ASP.NET MVC web application that uses NHibernate with FluentNHibernate's auto mapping feature for its data access. I have encountered a scenario in which I would like NHibernate to persist some classes as binary data.
public class User { // This field will be persisted public virtual byte[] PortraitData { get; set; } // This method will get me what I'm actually interested in public virtual Image GetPortrait() { return SerializationHelper.Deserialize<Image>(PortraitData); } }
(I leave the implementation of the SerializationHelper class to the reader's imagination. It doesn't do anything complicated, just serializes and deserializes data into byte arrays and back.)
How to make hyperlink field or buttonfield pop up a window and redirect to a new page at the same time? so far it can only redirect to a new page, but target is also to pop up a child window when try protected void Cheque_GridView_RowCommand(object sender, GridViewCommandEventArgs e) can not find a way to add attribute to button to use javascript to pop up a child window <asp:HyperLinkField Text="Select" DataNavigateUrlFields="BatchNo, BankCode, ChequeDate2, IssueDate2, CompanyCode, VoucherBatchNo, VoucherNo, ChequeID, ChequeNo, PaymentType, DespatchType, DespatchDate2, Curr_Code, Amount" datanavigateurlformatstring="~/Edit_Batch/AddCheque.aspx?BatchNo={0}&BankCode={1}&ChequeDate={2}&IssueDate={3}&companycode={4}&VoucherBatchNo={5}&VoucherNo={6}&ChequeID={7}&ChequeNo={8}&PaymentType={9}&DespatchType={10}&DespatchDate2={11}&Curr_Code={12}&Amount={13}" />
I have a template field in datagrid. The field shows in insert mode. I do not want to show it because it is a thumbnail to an attachment. The regular bound fields have a setting "Insert Visible" which could be set to false - that is supposed to hide them in insert mode. The template field has no such thing. I have even tried to put Insert Visible = False in to the source but to no avail.
My definition of the template field looks like this:
clarify: i am using a virtual keyboard that has to work on deferent text fields, and deferent pages, every time i click on a text field it sould pop up and every key i press i need to show on the text field....the problem, as every one knows, is to bind a deferent text field to the virtual keyboard, And as i said, also, to use it on deferent pages without rewriting the keyboard code for every page again and again, some thing that will not do... still can not give any code as there is no code to give, so there is no code...
i don't have code to show becouse i am trying to figure out how to do this and not showing a problem...
Background: I have an aspx file that holds a keyboard div and a hidden TextArea or an Input type=hidden (not decided yet). This page is a user control so it cen be used in all the pages that needs it...
What i am tring to do: Using JQuery bind('focus',...) method to bind any field in a certian aspx page (not the keyboard UC itself) to the hidden text field, i want that every thing i click on the keyboard will show in the text field that is on focus....
Can i relate in JS/JQuery to a field that is in a different page, will it recognise it? how can i do the bind, how can i transfer text from one field to another? if there a better way to do this, i will be happy to hear about it...
have situation here. On checking checked checkbox inside template field on grid view. This my codethis code suppose to be update into mysql when checkbox of each row being checked. Mean only update database which row has being checked, other wise the data inside database not being updated.What happen now once button being click, code above will be executed, but all the data being update not considering the checked checkbox only.
I ma sure this is easy but asp.net is new for me. Anyway I'm trying to collect a username and put it into a SQL database. I collected the username just fine:
Code:
[code]....
Then I tried numerous ways of trying to put it into a text box with no luck:
When adding list item the Value field is being set to the Text field. Initially I though the problem was related to the input parameter for the primary key ( group_type_id ) as it is configured as OUTPUT variable.
Interesting enough, when I Watch all of the values, everything is correct. So for example, I'll watch these:
ddr["group_type_name"] comes out as "Dept" ddr["grouptypeid"] comes out as 4
When the item is created however,
itms.TEXT = "Dept" itms.Value = "Dept" <-- THIS IS THE PROBLEM
I'm at a loss why the listbox values are being set to the text values when I can clearly see the data reader values are correct. ?