|
Thanks for information.
But I first I am binding ds to the arraylist.
How arraylist can be fetch because it contains system.data.dataset.
and in that dataset the actual records are there.
Regards,
sjs4u
|
|
|
|
|
Use foreach and iterate through each item, cast it to desired type before you use them. If you are using .NET 2.0 or later, I recommend you to use generic List class. This avoids the overhead of casting.
|
|
|
|
|
Hi,
Thanks for the solution. But First time I have no idea about generic List class.
Following is the code where I am adding the values of ds into the arraylist.
for (int m = 0; m <ds1.tables[0].rows.count; m++)<br="" mode="hold"> {
//QuestionArray.Contains(ds1);'
QuestionArrayList.Add(ds1.Tables[0].Rows[m]);
}
Now I want to get back the arraylist records.
How can I get it.
Thanks
sjs4u
|
|
|
|
|
sjs4u wrote: But First time I have no idea about generic List class.
Generics is a new concept included in .NET 2.0 onwards. If you use a generic List class, you can supply the type of object which will be kept in the list, which is more efficient than casting from object to your desired type. In your code you are keeping DataRow instance in the array list. Here is an example which uses List to keep the DataRow instance which is strongly typed.
List<DataRow> list = new List<DataRow> ;
list.Add(ds1.Tables[0].Rows[m]) ;
sjs4u wrote: Now I want to get back the arraylist records.
Use a foreach
foreach(DataRow row in (DataRow)QuestionArrayList)
{
}
OR
foreach(object obj in QuestionArrayList)
{
DataRow row = null;
if(obj is DataRow)
row = (DataRow)obj;
} If you use a generic List you can avoid the casting.
|
|
|
|
|
hi all ,,
i want to apply css dynamically to tooltip on server custom control(Button control).
so how to do that please send me any help.
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
Hi,
there isnot any method to apply css to tooltip.
You can try for div and javascript to make tooltip.
Search on it.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Tooltip is shown by browser. You can't change it. As SunRays said, use div to create your own tooltips
|
|
|
|
|
HEllo friends
i would be glad if u help me wih this problem
can u tell me the proper way to connect ASP.net with MYSQL
if possible tell me what is the procedure to connect it.
nad what is required to connect to it.
|
|
|
|
|
u Wana database connection code of ASp.net with my ssql
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
|
|
|
|
|
hey thanx but i want to know how do i configure My Sql with asp.net
do let me know please
my email id is
--->sumitpcool@yahoo.co.in
plz do inform me
|
|
|
|
|
first u Imports Data.SqlClient
Imports System.Data.SqlClient
Then u Define the connection variable
'' Connection string
Private ConnString As String = "server="192.168.8.40";Database="DatabaseName";uid="SQLLoginName";pwd="pASSWORD";"
define CONNECTION VARIABLE
Private _SqlConnection As SqlConnection
inslz connection variable
_SqlConnection = New SqlConnection(ConnString)
ofter that u use this connection
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
|
|
|
|
|
|
|
You can use ODBC[^] or MySQLConnector[^]. ODBC adds an extra layer to the communication which makes your communication slow. So you can use MySQLConnector, which is very efficient. Download the connector from MySQL website. Also when you connect MySQL with ODBC, you will end up with a connection pooling issue which is a known bug for MySQL.
|
|
|
|
|
Hi All
I want to open a custom web page when click on Browse button on "File Upload" control in ASP.Net.
I need to open my own web page there.
can anybody help me.
Thanks.
|
|
|
|
|
$unil Dhiman wrote: I want to open a custom web page when click on Browse button on "File Upload" control in ASP.Net.
It is not possible using File Upload Control. But you can mimic or create same type of control, and can show your custom page using window.open or window.showModalDialog function. If you are using Microsoft Ajax, you can use the control toolkit which is available in www.asp.net for free which has a Popup control (I believe).
|
|
|
|
|
|
Hi,
I have a gridview that generates dynamically inside an aspx page. There is a template field which is also generated dynamically inside the gridview. I need to display Image in this template field. The image data comes from a database as byte[]. I have created a CompositeControl that gets byte[] through a public property and renders this byte[] data as image using HttpContext.Current.Response.BinaryWrite() inside CreateChildControls() method. I am using this composite control in the above template field as a databound control to display image. But when I run the page, the page only displays the image and other page/gridview data is not showing at all. If I see the type of the generated page from the property its "JPEG Image". No "View Souce" is available.
Here I'm giving some extracts from the code:
product.aspx:
=============
TemplateField tc = new TemplateField();
tc.HeaderText = attribute.Name;
//tc.HeaderTemplate = new GridViewTemplateField(ListItemType.Header, attribute.Name);
tc.ItemTemplate = new GridViewTemplateField(ListItemType.Item, "AttribValueId");
tc.HeaderStyle.CssClass = "headerstyle";
tc.ItemStyle.CssClass = "rowstyle";gvProducts.Columns.Add(tc);
GridViewTemplateField.cs:
=========================
void ITemplate.InstantiateIn(System.Web.UI.Control container)
{
switch (templateType)
{
case ListItemType.Item:
ProductImageControl productImgCtl = new ProductImageControl();productImgCtl.DataBinding += new EventHandler(productImgCtrl_DataBinding);
container.Controls.Add(productImgCtl);
break;
}
void productImgCtrl_DataBinding(object sender, EventArgs e)
{
Control control = (Control)sender;
object dataItem = ((IDataItemContainer)control.NamingContainer).DataItem;
DataRowView productRow = (DataRowView)dataItem;
byte[] image = (byte[])productRow["ImageBytes"];
ProductImageControl pi = (ProductImageControl)sender;pi.IsThimbNail = true;
pi.ImgBytes = image;
}
ProductImageControl.cs
=======================
public class ProductImageControl : CompositeControl
{
protected override void CreateChildControls()
{
byte[] image = imgBytes; // through a property
HttpContext.Current.Response.ContentType = mimeType; // through a property
HttpContext.Current.Response.BinaryWrite(image);
}
}
Am I missing something or doing something wrong? Can anyone please give advise?
Thanks in advance!
|
|
|
|
|
Hi,
We have a website developed in asp.net 2.0, c#, sql server 2005. I need to provide users with a way to import their address books from gmail, yahoo, hotmail, and aol at the least.
I searched the net, and found soooo many solutions, most providing code to be integrated with our code, some providing web sites that would do the conversion. Ideally I'd like to connect to some sort of a service where we would provide the service the user's email and password, and would get back a comma separated list of address info from their address books. The solutions on the net cost anywhere from $0-$500, and I could not find any rating as to how well the solution would work. So its hard to go with any of them, and know that they'll work well now, and continue to work in the long term, as in they'll keep adding more facilities to import from, continue to support any changes needed to current solution such as when gmail changes their address book format...
Any recommendations will be appreciated.
Thanks.
Shefali
|
|
|
|
|
hi shefali_sinha,
According to me, only user can import a comma separated list of address info from address books. This can be happen on variety of domains such Yahoo, Gmail, Rediff, Aol and etc. These service providers doesn't allow any third party software to access address book of their users and generate a comma separated list from it.
Even if you know User Name And password then also Domain host doesn't provide access to any information of user using Software. You can access any user account using it's User id and password and generate a comma separated list from it but only manually.
There is no such (Tool)software which automatically feed user id and password and make login to domain name. These domain host keep track of such things and mark as a Spam.
So, it is better to generate a comma separated list of address info from address books after that you can use such list to your software. You can read list easily.
Also all these people on the internet talking about providing such facility is fake. If such things are possible then there is no security on the email and no secure HTTP's.
Hope this will help you.
Dilip Kumar Vishwakarma
|
|
|
|
|
Dilip,
Thanks for your response. Appreciate it.
Do you have any idea how LinkedIn and Facebook are importing their user's address books? They have done what I've proposed doing. They've been doing this for a while now (a year or so), and have not been marked as spam.
Thanks in advance.
Shefali
|
|
|
|
|
Hi..
I am also developing an application for same requirement i.e Importing Contacts from Mail Clients .I tried for many solutions but i didn't get any Valuable Solution for me.
we have downloaded some code from "ideabubbling" and tried it, but some times it is not working for some account's in rediff,Hotmail,AOL.in
will the maildomain's constantly change the session or links which are hardcoded in the downloaded code.If u found any solution please help me..its very Important for me.
--Can u provide any Suggestions or Solution for this Problem.
->I am little bit poor in Communication plz excuse if wrongly spell
Regards,
SukkuReddy
|
|
|
|
|
hello!
I need any article on the topic "Application/ Benifits or Advanteges of a Digital Dictionary".Please any one help me to search this topic at least five pages.
i'll b very thankfull.
my email id is: abdul_bu@yahoo.com
|
|
|
|
|
Don't cross post. Find one relevant forum and post there.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Months ago in VS 2005 I did some demo projects with AJAX and everything worked.
I'm now using VS 2008 with the built in AJAX tools and I am running into some difficulty where the entire page is refreshing even though I have my event inside an update panel.
Here is my aspx page:
<br />
<form id="form1" runat="server"><br />
<div><br />
<br />
<asp:ScriptManager ID="ScriptManager1" runat="server"><br />
</asp:ScriptManager><br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
<br /><br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server"><br />
<ContentTemplate><br />
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label><br />
<br /><br />
<asp:Button ID="Button1" runat="server" Text="Button" /><br />
</ContentTemplate><br />
</asp:UpdatePanel><br />
<br />
</div><br />
</form><br />
Here is the page load code behind set to refresh the time in both labels.
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
Label1.Text = System.DateTime.Now.ToString();<br />
Label2.Text = System.DateTime.Now.ToString();<br />
}
The problem I am having is that even though the button click event occurs inside the update panel the entire web page is posting back. Both labels refresh with the current datetime.
Any ideas?
|
|
|
|