|
DataTable dt = yourdataset.Tables[0];
List<int> ids = new List<int>();
foreach(DataRow row in dt.Rows)
{
ids.Add(((int)row[0]));
}
//Now you have the list of ids from the table.
|
|
|
|
|
Hi
I am using Visual Studio 2005 to develop a Web application. I have an image at the top of a Master page. I have created a separate folder, called SecurePages, for the pages that require authorization. I have specified the same master page for the normal pages as well as the pages in the separate folder. When I run the application, the image on the master page display correctly for the normal pages, but not for the pages in the secure folder.
Any ideas?
Thanks.
Kobus
|
|
|
|
|
Are you sure about the path of the image.
Any systematic work reflects its significance for a long time. So let's discuss the best...
|
|
|
|
|
Asalam-O-ALikum!
How can custmize lagend's label text in crystal report
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
you can't customize legend's label text or Data Label Text in the Design view. You can customize the text Format and the Position. run the report and see whether is show the proper data or not. Those labels are used to display the actual data. one more thing you can do that is you can enable and disable the label...
Regards John
|
|
|
|
|
Hello Everyone,
I've to play a playlist of songs in a Audio/Video player And also that playlist is changed dynamically by the admin. itself.. as per his/her requirements...........
|
|
|
|
|
do you plan to create some sort of radio/tv broadcasting?
Any systematic work reflects its significance for a long time. So let's discuss the best...
|
|
|
|
|
i have a checkboxlistitem.where let say A,B,C,D,E are the items in that control.
and below that 5textboxes are there named as textbox1,textbox2......textbox5.
initiallay all textboxes are disabled.now i want when ever i select A the corresponding checkbox should be enable i.e textbox2.
and likewise if i select B then textbox2, if Dthen textbox 4.likewise.
what will be the vb.net code for it.
thnaks in advance
|
|
|
|
|
Enabling and Disabling the TextBox based on the items checked on the checkBoxList can be done in 2 ways. Either you can do it in the client-side or you can do in the server side.
You can access the checkListBox on the client side using the document object...
document.getElementById(checklistbox).options[1].selected = (true or false)
textbox can be enabled and disabled on the client-side using the disabled property of the textbox.
textBox.disabled = (true or false)
If you are doing it on the server-side
enable the AutoPostBack Property of the checkListBox and
write the server side code on the CheckBoxList_SelectedIndexChanged event
textbox can be enabled and disabled on the server-side using the enabled property of the textbox.
textBox.Enabled = (true or false)
Regards John
|
|
|
|
|
hi, all
here another small query for you.
i have a checkboxlistitem.where let say A,B,C,D,E are the items in that control.
i am able to store the mulitiple value of the checkbxlist item .(by taking a string and storing the multiple value by "," operator).
now my problem is that when i am retriving the value from the db ,am not able to retrive the value of the lsitboxitems.
(suppose in emp_id "1" i have stored the values of A,C,D from checkboxlist,when i retrive the record having emp id 1. i want to retrive its value i.e A,C,D and the corresponding checkbox of the values to be checked in the front end.)
what will be code in vb.net(please write the complete code)
|
|
|
|
|
biswa47 wrote: (please write the complete code)
give a try first then come here if you happen to face any problem in coding or debugging the errors.
biswa47 wrote: (suppose in emp_id "1" i have stored the values of A,C,D from checkboxlist,when i retrive the record having emp id 1. i want to retrive its value i.e A,C,D and the corresponding checkbox of the values to be checked in the front end.)
Here is the code you asked....
Dim lstItem As New ListItem
Dim lstItems() As String = Value.Split(",")
For Each lstItem In chklstBox.Items
For I As Int16 = 0 To lstItems.Length - 1
If lstItems(I) = lstItem.Value Then
lstItem.Selected = True
End If
Next
Next
Regards John
|
|
|
|
|
after trying ur code , i got some problem thats why i came here again.what is "Value" here. have u checked that weather its working or not
|
|
|
|
|
say for an example the value is "A,B,C". You need to split the values and have it in a string array. Take each value and check against the items of the checklistBox. while looping through the items, if any value in the array matches with the value of the checkListBox item then mark it as checked.
This is one way of sorting out this problem.....
Regards John
|
|
|
|
|
biswa47 wrote: after trying ur code , i got some problem
What kind of problem? any syntax or logical error?
biswa47 wrote: thats why i came here again
Nothing wrong in coming here again and again. you will go with the best solution. but you should give a try at first right...
biswa47 wrote: what is "Value" here
the value that you retrieve from the database example "A,C,D"
biswa47 wrote: have u checked that weather its working or not
No Not really...I just gave you an idea...
Regards John
|
|
|
|
|
hi,
i am developing a c# web application. i dragged an adrotator onto my webform, and created the corresponding ads.xml file.
the adrotator tag is as follows
<asp:adrotator id="AdRotator1" advertisementfile="~/ads.xml" runat="server" forecolor="#FF8000">
the contents of the XML file are as follows
<advertisements>
<ad>
<imageurl>/images/Blue hills.jpg
<navigateurl>www.site.com
<alternatetext>
BLue Hills
<impressions>1
The problem is that images are not being displayed, but their alternate text is displayed, and it is rotating.
please help
kunal
Kunal
|
|
|
|
|
|
hi,
i have already followed all that had been mentioned in the article. but still the alternate text changes, and no images
Kunal
|
|
|
|
|
can you show the contents of your xml file?
Regards John
|
|
|
|
|
here it is..
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
<Ad>
<ImageUrl>/images/Blue hills.jpg</ImageUrl>
<NavigateUrl>www.site1.com</NavigateUrl>
<AlternateText>
BLue Hills
</AlternateText>
<Impressions>1</Impressions>
</Ad>
<Ad>
<ImageUrl>/images/Sunset.jpg</ImageUrl>
<NavigateUrl>www.site1.com</NavigateUrl>
<AlternateText>
Sunset
</AlternateText>
<Impressions>1</Impressions>
</Ad>
<Ad>
<ImageUrl>/images/Winter.jpg</ImageUrl>
<NavigateUrl>http://www.site1.com</NavigateUrl>
<AlternateText>
Winter
</AlternateText>
<Impressions>1</Impressions>
</Ad>
</Advertisements>
thanks
Kunal
|
|
|
|
|
I have 2 machines in the SAME domain. I can access \\sql_server\c$ in explorer without entering a username and password from the machine ws03.
If i use the software PivotView i can connect to sql_server with this string connection:
Provider=MSOLAP.3;Cache Authentication=False;Password=admin;User ID=administrator;Initial Catalog=piou;Data Source=sql_server;Impersonation Level=Impersonate;Location=sql_server;Mode=ReadWrite;Protection Level=Pkt Privacy;Auto Synch Period=20000;Default Isolation Mode=0;Default MDX Visual Mode=0;MDX Compatibility=0;MDX Unique Name Style=0;Non Empty Threshold=0;SQLQueryMode=Calculated;Safety Options=1;Secured Cell Value=0;SQL Compatibility=0;Compression Level=0;Real Time Olap=False;Packet Size=4096
When i try to use the same string connection in my code (my application is on ws03):
Dim rs As New Microsoft.AnalysisServices.Server
rs.connect("Provider=MSOLAP.3;Cache Authentication=False;Password=admin;User ID=administrator;Initial Catalog=piou;Data Source=sql_server;Impersonation Level=Impersonate;Location=sql_server;Mode=ReadWrite;Protection Level=Pkt Privacy;Auto Synch Period=20000;Default Isolation Mode=0;Default MDX Visual Mode=0;MDX Compatibility=0;MDX Unique Name Style=0;Non Empty Threshold=0;SQLQueryMode=Calculated;Safety Options=1;Secured Cell Value=0;SQL Compatibility=0;Compression Level=0;Real Time Olap=False;Packet Size=4096")
I have an error:
An existing connection was forcibly closed by the remote host
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Stack Trace:
[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +1018171
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +119
[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +267
System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count) +194
Microsoft.AnalysisServices.DimeRecord.ForceRead(Stream stream, Byte[] buffer, Int32 length) +35
Microsoft.AnalysisServices.DimeRecord.ReadHeader() +37
Microsoft.AnalysisServices.DimeRecord..ctor(Stream stream) +100
Microsoft.AnalysisServices.DimeReader.ReadRecord() +74
Microsoft.AnalysisServices.TcpStream.GetResponseDataType() +74
[ConnectionException: A connection cannot be made. Ensure that the server is running.]
Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession) +442
Microsoft.AnalysisServices.Server.Connect(String connectionString, String sessionId) +192
Microsoft.AnalysisServices.Server.Connect(String connectionString) +6
Autorisation5.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\a\Administration\Autorisation\Page5.aspx.vb:22
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
What can i do? i think (i hope!) i'm not very far of the solution!
Thank you!
DeathSurfer
|
|
|
|
|
Hi
I am using Visual Studio 2005 to develop a Web application. I have a Menu control on a Master page. I have set the StaticSelectedStyle to have a different backcolor and forecolor than the normal, unselected menu items. I have also defined the NavigateURL for the items. When I run the application and I select the menu item it goes to the correct page, but the style of the selected menu item is not what I have specified.
Is there any other settings that I need to look at?
Thanks.
Kobus
|
|
|
|
|
Hello all,
Lately i have been looking for a way to get the values (option[n].value) under the mouse (mouseover event) from a javascript function. But i failed miserably.
I tried various possible events (onFocus, MouseOver ) but am not being able to get the value of a particular option. Its only giving me the one that is selected.
I want to know the value of a particular item (ListItem / option ) which is under the mouse at a particular instance and want to change its colur.
Any help/reference/Discussion wud be of real help.
Thanks in advance.
|
|
|
|
|
As far I think you can not change any property of the combo box(select control) until the combo box menu is open. After selecting any item from the combo box menu you can change its any option item. If that is you want?
|
|
|
|
|
Thanks for the reply mate.
Even i found ways to raise event once a particular item is selected.
But there must be "some" way to work upon a particular item , on the basis of mouseover event on a particular item. The comboBox must be selected indeed, but when its opened, then i want to raise event on "each" item within it as the mouce is moved over it.
[What all i am looking for]
One may notice that even the browser internally raises some event as the mouse is moved over the items. Since the item under the mouse is displayed in different color. There must be something like that in javascript as well.
|
|
|
|
|
I have designed a chart in crystal report. And I can not find how can I change the data lables in charts. If anyonw know anything about this then help me.
|
|
|
|