|
but I am retrieving the numbers of emails using SQL statement which will be called using the button.
which is then I need an array and delimiters to put the semicolon to separate each of the emails I have.
my SQL statement is like that
SELECT Email
FROM Customers
WHERE newsletterAgree = "True"
I am confused on how to start
|
|
|
|
|
I suspect you may be starting to get way over your head here. You may need a contract developer to piece all this together.
StringBuilder sb = new StringBuilder();
using (SqlConnection conn = new SqlConnection("(replace this with a real connection string)"))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand("SELECT Email FROM Customers WHERE newsletterAgree = 1", conn))
{
using (SqlDataReader rdr = cmd.ExecuteReader())
{
while (rdr.Read())
sb.AppendFormat("{0};", rdr["Email"]);
}
}
}
string finalString = sb.ToString();
If you want to convert finalString to an array, then once again, you need to do:
string[] finalArr = finalString.Split(';');
This should be compatible with all versions of ASP.NET
|
|
|
|
|
Since contents may have any type of symbols, I suggest that you convert it into Base64, and then you can use either comma or ';', or many other symbols as delimiters, from those that are not included into Base64 itself.
|
|
|
|
|
Hello,
I am Binding a ajax accordion dynamically,
I am using <HeaderTemplate></HeaderTemplate> and
<ContentTemplate></ContentTemplate> to bind a data
in contenttemplate i am using datalist, Itemtemplate.
On Development side the accordion application is working fine. but same application giving problem on production server accordion section is coming blank.
I checked at both environment production and development by using firebug. on production environment the code for accordion not getting executed also there is no problem in storeprocedure.
Please help me what problem may there.. because coding and database are fine in development but at production not getting what issues are there may be... !!!! :doh: :zzz:
|
|
|
|
|
|
I remember back 10 years ago when I was using binding, that when you bind a control to a external datasource, the binding was not very transportable.
In other words, when you move your project around from machine to machine, you had to rebind the control to make it work again.
Most likely, you bind is very basic and simple, and you need to add more information to it. I don't remember how to bind an object anymore, or any details for it, but I do remember how much trouble it caused in deployment, and quickly I learned how to write code for it instead.
|
|
|
|
|
You would have to start by narrowing down the problem , for you have mixed in all too much into your question here. It is doubtful to be a problem with Ajax. Most likely your server-side code. But you need to verify that yourself, to see where exactly you start losing data.
Ajax Accordion in itself is all too simple, it should give you no trouble. In fact, I even wrote my own implementation of Ajax Accordion that I used here: http://cv.vitalytomilov.com
Anyways, narrow down the problem first, and then post an update here
|
|
|
|
|
how to pass drop down list and text box values from page1.aspx to page2.aspx?
Sumit Chandra
|
|
|
|
|
You can use query string or session variable to pass data into another page
|
|
|
|
|
For example in page1.aspx
string id = "121";
Session["QueryString"] = id;
Response.Redirect("admin_home.aspx");
to get data in page2.aspx
perWorkId = Convert.ToString(Session["QueryString"]);
hope it helps
|
|
|
|
|
thanks for replying paulalvin .... what is 121.. it can be anyting?
|
|
|
|
|
Seriously? That's your question?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Maybe you are asking "can it be any type?" The answer would be "yes." A session variable can hold any type, but be careful, as holding large classes, etc, in session variables can be devastating to scalability.
|
|
|
|
|
|
Hi
you have to use the "Query String" to send data one page to another.
|
|
|
|
|
Cobblers
C# has already designed away most of the tedium of C++.
|
|
|
|
|
|
You can use session/query string to pass values from one page to another.
query string
Response.Redirect("Home.aspx?value="'+ddl.SelectedItem.Value+'");
on another page you can receive
string temps=Request.QueryString["value"];
Session
Session["TempToStore"]=ddl.SelectedItem.Value;
Or In case of large data you can use XML Manipulation to write or Read.
There is another way to create dataset and store it into session
http://stackoverflow.com/questions/2288299/storing-and-retrieving-datatable-from-session
|
|
|
|
|
you can pass it by using query string
|
|
|
|
|
Suppose there is a web design project (the C # language asp.net2.0), open the project and press F8, vs.net 2005 does not plan to watch every step run debug and run the show always. I want to see the first command is run when you press F8, you have to do ?
|
|
|
|
|
When I open a project and press F8 in Visual Studio, nothing happens for me.
I am not sure what are you trying to do or trying to ask here. Please update your question. Try again to explain on what you are trying to do.
|
|
|
|
|
In the web project, I want to know when press F8 to run a command line first?
|
|
|
|
|
Member 2458467 wrote: I want to know when press F8 to run a command line first?
AFAIK, there is nothing(at least not command line) that gets executed on press of F8.
|
|
|
|
|
|
Send baigui by line »15 minutes ago
I try to Debug page Default.aspx, Default.aspx.cs it syntax error page, I find the error code in the Default.aspx.cs file does not have this command, see the attached image file error. So a command line, 2.3 where the error lies in the Default.aspx.cs page? can download attachments in error, you run the test.
Source Error:
Line 1: <% @ Page Theme = "Default" Language = "C #" MasterPageFile = "~ / MasterPage / MasterPage.master" AutoEventWireup = "true" CodeFile = "Default.aspx.cs" Inherits = "webapp4U.UI._Default "%>
Line 2: <% @ Import Namespace = "webapp4U"%>
Line 3: <% @ Import Namespace = "webapp4U.BOL"%>
http://www.crocko.com/8AFB66261DDA4B7E99CAF504C73427C5/default_err.jpg[^]
http://www.crocko.com/5D18C18197C147149F2A456F5A971E64/Vidu.rar[^]
|
|
|
|