I need to create a form showing our production numbers for the week on each line. I can do this in listview using grouping and totals. The problem is I want these numbers to show in a form so I can cutomize the look of the report. Is there any way to assign a query to each text box on a form?
I have a cart application I am working on where I need to assign a value based on a query string. I am telling the code behind to override the price returned by a linq query with the price in the value of the price variable passed by the string. The default linq value for this item is zero, and isn't updated by my attempt to override. Here is what I am trying with no success so far. Query format sent to page is .....aspx?Price=
New to Linq and Var type have a method where linq query is executed, want to return the result and assign it to GridView. but method don't take the return type as var.
So was wondering how do i return this query result?
Should i assign this result to DataTable first and make the method return type as DataTable?
Here is the code, This is what i want to do but not sure what is the right way
I have an entry page that contains a datalist. I also have an ascx user control page that when it runs on page load, renders an html table template which contains category information from an SQL self referencing table. When the SQL query run on page load, it bind the results to a datalist called dlCategory, and repeats for all rows that have no value in a field in this SQL table called ParentCategoryCode. The SQL table is called ServiceRequestCategories and basically consists of CategoryCode, CategoryTitle, and CategoryDescription, and may or may not have a ParentCategoryCode associated with it.
Records without a ParentCategoryCode are top level categories, and anything that has a ParentCategoryCode are second or third level categories. The way I have the data set up, it ends up being 4 rows that are returned and rendered as 4 html tables. Each one of these is tied to the user control, and each user control runs another datalist, and shows all CategoryTitle values for each Category that has a ParentCategoryCode (second level categories). This works when you click on a LinkButton for any CategoryTitle. This all works fine.
My question is, how can I use an SQL select query to plug the value of the CategoryTitle into a label called lblCategoryBreadCrumb on my main entry page? Here is my code, but it does not seem to work.
Protected Sub ShowBreadcrumbLabel() Dim strSQL As String Dim dsData As DataSet Dim dtData As DataTable
How it is possible to assign datatype of an attribute retrieved using sql query to a string? for eg:
SqlCommand cmd = new SqlCommand("select data_type from information_schema.columns where table_schema='dbo' AND table_name=table1 AND column_name=column1, con);
I want to assign this datatype value to a string. How it is possible?
I used a query which returns some rows as result.. Querys is
var UserActivity = (from x in entity.user_activities oin p in entity.team_group_friends on x.activity_doer equals p.userid where p.userid == teamORGroupID select x).ToList().Take(5);
There is no error in query...But when i assisg the UserActivity to a view model ..
I have a webform with a multiline textbox. In the code behind file I create a StringCollection & add some text. How can I assign the StringCollection to the multiline textbox?
I am passing in a value to the form that I ultimately assign to a textbox using javascript. The value is a calculation based on values from another page/form. However, the textbox is editable.
When reloading the form with the previously saved data, I don't want the value of the textbox to be overwritten with the pre-calculated value from another page if it was edited manually upon save.
The other stipulation is, the page/form that has the values that the calculation is created from, can be changed. Therefore, I would also want to check to see if the calculated value has changed since last load, and if so, load that over the manually entered value.
So...
If textbox is blank populate with calculated value else if Manually entered value trumps calculated value else if calculated value has changed since last calculation, it trumps manually entered value.
The other concern with this all, is how do I determine if the user has typed in the textbox to determine if the value was manually entered?
I am using Form View to Insert Data using ObjectDataSource Visual Studio2010.
It is running fine, taking values inserting and then showing in grid view using SqlDataSource.. also editing in detailsview using SqlDataSource.
1. My Column EmployeeID is of String nature.now i dont want the user to input Employeeid, i want E-123 type value. and i want to get the max id from table and +1 before inserting new record. what are the step to do it.
2. I want to display status column as check box in detailsview. it is again string type and taking values T or F. how to do it?
3. Status Checkbox need to be displayed in Grid View also.
I see a lot of people have been asking this question, some was because of the if postback check , but mine is different. i am using AjaxModalExtender to show my popup on the server side. this is my markup
I have a web page in which i have some validation after textbox lostfocus but i want that If Error occurs then text box changes their position and as soon as user corret that error text box set it on its original position how can i do it
I am using code behind to populate my gridview. I have added a OnRowEdit function but I do not know how to assign the value of the textbox because I don't have a textbox in my code. All I use is
[Code]....
And for the code behind on the update section I have
I am using MaskedEditExtender so that user can enter date inside textbox with specified mask like "DD/MM/YYYY".
i am facing problem when i am trying to assign value within text box from some string variable while when i am directly typing value within text box it's successfully enter like "28/06/2010"
How can i assign value within masked text box from variable. For mask text box i am using MaskedEditExtender of AJAX.
I see a lot of people have been asking this question, some was because of the if postback check , but mine is different. i am using AjaxModalExtender to show my popup on the server side. this is my markup
[Code]....
as you can see i have a gridview that will be on the modal and its working fine, now after the grid has returned some results, i will select one record via the checkbox on the Grid and click the button "btnPickrecord" and this will fire my server side code
[Code]....
the breakpoints got a hit and i stepped through it and i the value get assigned to the textbox <b> txtreference.Text</b> , but when i close the modal the textbox is empty , or while the modal is open i can see the value does not reflect in the parent page. Here is the Code for invoking the modal
I'm in a MVC2 page and wish to know how you assign a value of another textbox that is in TexBox I will write a value in one currency and the desire to stop writing auto convert to me another currency.
I need to copy the values from a textboxes text property into a nullable double, currently I have:
//test for empty string - if yes set dblMyAmount to null, // else set value to this.MyTextbox.Text value Nullable <double> dblMyAmount = ((this.MyTextbox.Text + "").Trim() == "") ? (Nullable<double>)null : Convert.ToDouble(this.MyTextbox.Text);
which is not working - the error message is "Input string was not in a correct format."
I have a checkbox on my project and I have textboxes as well. I tried some jquery code as you can see below for this function;
I would like to get the ctl00$MainContent$firstnametxt.text value to ctl00$MainContent$firstnamedrivertxt.text value when the checkbox is clicked and I want the ctl00$MainContent$firstnamedrivertxt.text to be null if the checkbox is unchecked. how can I do that? the below one doesn't work for me.
I have a gridview table and i need to select one record and insert the Datakey of the selected record to a formview textbox control. I'm completely lost...