I have a customer database of 100,00,000 records stored in a sql db.I need to send mass emails to those customers everyday at a particular time.I want to use thread pool to achive it.
I have some files listed on a listbox and want to upload them to the server. The values doesn't need to be selected. But I can't even get it working. Below is my source code:
I have some server controls both textboxes and drop down list box's that I placed on a panel control. My question is I would like to loop through the controls textboxes and drop down list and clear all values.
Is it possible to add the ListItem values in the code-behind within a for loop? If so, what is it? Here is my current code:
rblContentTypesGetAll.Items.Clear(); for (int i = 0; i < dt.Rows.Count; i++) { rblContentTypesGetAll.Items.Add(dt.Rows[i]["contentType"].ToString()); }
I have always had problems with creating loops so here I go again.
I have a dataset populated with 1 column and multiple rows. What I am trying to do is create a page that will be used for emailing multiple users. The names will need to be separated by a semi colon.
Actuall i retrive one row from Database with more than 80 columns on page load. Now i need to fill these data in every control like Text-Box and Combo-Box which i have using on the Page.
My Column Name and My Id of the Textbox or combobox are same. now i need to fill the value in textbox and combobox where coumn name and textbox id are same.
Eg.
(1) TextBox Id's Name :- txtCustName, txtCustNo, txtAddress, etc(More than 80 Column).
now i will be remove the 'txt" from every id.
so it would be seems like CustName, CustNo, Address, etc.
Here is my code, using LinQ to get the data from database.
public IEnumerable categoryData() { db = new DBModelDataContext(); var cat = from c in db.Categories select new { c.categoryname,c.categoryid }; return cat; }
trying to get the values (categoryname and categoryid) into textfiled and valuefield of dropdown list.
dt = new clsData(); ddlCategory.DataSource = dt.categoryData();
what is the code that i need to write to assign the categoryname to textfield and categoryid to valuefield. I mean how to loop through the values coming from the above function.
select AutoIdx,TxDate,Id,AccountLink,Description,Debit,Credit,(Debit-Credit) as Actual from PostGL where Id='JL' and AccountLink=2
AutoIdx TxDate Id AccountLink Description Debit Credit Actual 3 2010-01-22 JL 2 bcb 0 35.09 -35.09 5 2010-01-28 JL 2 g 3.51 0 3.51
I am trying in view like this
declare @cnt int declare @i int set @budget=20 set @cnt= (select COUNT(*) from PostGL where AccountLink=2 ) set @i=1 WHILE (@i<=@cnt ) BEGIN set @tdebit=??
END
I am taking count the no of rows having AccountLink=2 I need to read all debit,credit and add all debit into totaldebit,all credit into totalcredit independently from table. then i need to show the totaldiff as Actual. i need ....totaldiff=totaldebit-totalcredit
I am dealing with dynamic fields in a for loop and now I need to retrieve the values that are being typed in the dynamic fields, any idea how can I do that? 2)also when I click the submit button, upon postback, the dynamic fields have gone missing, have been trying to slove that, but i did not, anyone knows how to deal with this? kinda urgent :x
3) and How do you compare the 2 dynamic fields? For eg: Im comparing the tbSch[i] to tbSch[i], so that the dates cannot be the same, am using a compare validator, but it throws me error that im comparing the same fields :) even though i change to ("tbSch" + i) for both, sorry Will provide my code snippet as follow :D tbNum is a textbox where user enter numbers and click generate
protected void btnGen_Click(object sender, EventArgs e) { for (int i = 0; i < Convert.ToInt32(tbNum.Text); i++) { // label and textbox needed Label lblSch = new Label(); TextBox tbSch = new TextBox(); Label lblWsGrp = new Label(); DropDownList ddlWsGrp = new DropDownList(); CompareValidator cvSame = new CompareValidator(); cvSame.ID = "cvSame" + i; cvSame.ErrorMessage = "Date cannot be the same"; cvSame.Operator = ValidationCompareOperator.NotEqual; cvSame.Type = ValidationDataType.Date; cvSame.Display = ValidatorDisplay.Dynamic; cvSame.EnableViewState = true; cvSame.ControlToValidate = (tbSch.ID);<<<<< what should be the value in here? cvSame.ControlToCompare = (tbSch.ID);<<<<<<<<<< and here? //schdule date lblSch.ID = "lblSch" + i; lblSch.Text = "Session Date : "; lblSch.EnableViewState = true; tbSch.ID = "tbSch" + i; tbSch.Width = 210; tbSch.Height = 27; tbSch.EnableViewState = true; //workshop grp lblWsGrp.ID = "lblwsgrp" + i; lblWsGrp.Text = "Workshop Group : "; lblWsGrp.EnableViewState = true; ddlWsGrp.ID = "ddlWsGrp" + i; ddlWsGrp.Height = 27; ddlWsGrp.Width = 210; ddlWsGrp.EnableViewState = true; ddlWsGrp.Items.Add("1"); ddlWsGrp.Items.Add("2"); //table to store data TableRow trow = new TableRow(); TableRow trow2 = new TableRow(); //row1 TableCell tc1 = new TableCell(); TableCell tc2 = new TableCell(); TableCell tc3 = new TableCell(); TableCell tc4 = new TableCell(); //row2 TableCell tc5 = new TableCell(); TableCell tc6 = new TableCell(); TableCell tc7 = new TableCell(); TableCell tc8 = new TableCell(); TableCelltc9 = new TableCell(); tc1.Controls.Add(lblSch); tc2.Controls.Add(tbSch); tc3.Controls.Add(lblWsGrp); tc4.Controls.Add(ddlWsGrp); tc5.Controls.Add(space); tc6.Controls.Add(CeSess); tc7.Controls.Add(space); tc8.Controls.Add(space); tc9.Controls.Add(cvSame) trow.Cells.Add(tc1); trow.Cells.Add(tc2); trow.Cells.Add(tc3); trow.Cells.Add(tc4); trow2.Cells.Add(tc5); trow2.Cells.Add(tc6); trow2.Cells.Add(tc7); trow2.Cells.Add(tc8); trow2.Cells.Add(t9); this.table3.Rows.Add(trow); this.table3.Rows.Add(trow2); } }
I would like to ask a question on the visual basic codes to loop the gridview to retrieve the values and based on the values, it will be provided as parameters to update to the database table using stored procedure.
Firstly, I have a gridview named grvProduct. The page (ui) will be loaded with data from the database with the use of stored procedures. And only certain values can be edited through the use of template in gridview. So based on those edited values, I'm supposed to pass these values as parameters to the stored procedure which will then update a database table.
Let say, I have 3 records retrieved from the database and displayed in the gridview. And I would like to edit a values in the 3 records, how do I do batch update and pass those parameters to the stored procedure? I went to debug and step through the visual basic codes and realised there were too many arguments specified because I actually loop the gridview.
Below is my visual basic codes:
[Code]....
Below is my Stored Procedure code: [Code]....
I believe it is the error in the looping of the gridview which results that I could not batch update the data/values.
I need to send 4 double values to a webservice. Which is the best way to send. Array or Arraylist. I read some where that Arraylist has issues to serialize.I am using the following code on the client .aspx page to construct the arraylist.
Code:
ArrayList CapPlan = new ArrayList(); CapPlan .Add(Convert.ToDouble(TextBox1.Text)); CapPlan .Add(Convert.ToDouble(TextBox2.Text)); CapPlan .Add(Convert.ToDouble(TextBox3.Text)); CapPlan .Add(Convert.ToDouble(TextBox4.Text)); After this arraylist CapPlan is constructed, what would be the syntax to send this arraylist to a webmethod? DataSet dataSetCapitalPlan = clientProxyobject.CapStock(CapPlan.ToArray(double));
And on the webservice side how can I receive this arraylist that was sent? [WebMethod] public DataSet CapStock(string As_of_Date, Array CapPlan) { }
I want to print the values on crystal report that user input on the asp.net webform. On my form i have few textboxes, radio button list and couple of gridviews. Im not sure how to send these values to crystal report? Im using asp.net 3.5 and .Net builtin crystal reports.
Using ASP.Net, VB.NetIn my web page, i have the textbox valueswhen i press the send button the textbox value automatically send to email address...How to do that...
i have some form with few textboxes, i need to send it to another page (asmx) in different server. in this asmx page there is a code handler the data. how can i send all the data without using querystring or server.transfer (the page located on outer server).
Upon clicking a button I need to send a collection and a few other variables to server in Json form.For each value in the collection the server code (C# ) wil update those other variables in the DB.
For example there is a ‘classnumber’ collection with values (First, Second, Third, ….),other variables (‘teacher_name’ and ‘subjectname’).For each value in the ‘classnumber’ collection I need to update the ‘teacher_name’ by searching for the ‘subject_name’ in the DB.So I need to pass the ‘classnumber’ collection,’teacher_name’,’subject_name’ values to server in json form. At the moment instead of sending the ‘classnumber’ collection I am sending ‘teacher_name’,’subject_name’,’classnumber’ as variables for each value in the collection ,which requires multiple requests made to the server.
Instead of these individual requests I am wondering if there is a way to send all the data at once to server in json form?
on button click i am checking all checkboxes..and I have other button on the Filedset which i submit.. when I submit clicks I need to send only which ever is checked from Fieldset?