|
The List class, of course. The point is that it's type safe.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
but i so enjoy explaining to the new people why when they put a string in they dont get an int out. unfortunatly i'm not exaggerating.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
If you declare the web method to return an ArrayList, it will actually return an array.
If you want an ArrayList you either have to create one from the array, or serialise the ArrayList into a string and deserialize it on the receiving end.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I managed to fix the problem by just changing one line.
I did the following...
ArrayList myList = new ArrayList(serCon.GetUserInfo((string)Session["email"]))
Then to access a value in the array - Session["var"] = myList[0]
Thanx to everyone who replied and helped. Appreciate it...
|
|
|
|
|
return userInfo;
}//End GetUserInfo
I the call this method from an aspx web page, which looks like this:
void Page_Load(Object sender, EventArgs e)
{
if ((string)Session["email"] == null) //check if user logged in successfuly
{
Response.Redirect("login.aspx"); //if not got to login page
}
else
{
ArrayList myList = new ArrayList();
ServiceControl serCon = new ServiceControl(); //new instance of webservice class
string ed = (string)Session["email"]; //get the stored email from login
myList = serCon.GetUserInfo(ed); copy arrayList from webservice into new arraylist
}
Test Data
www.yahoo.com
fgff
|
|
|
|
|
|
Is viewstate turned on for the control and for the page ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
Hi ALL
I like to Show Computer name and IP and host name of the computer viewing the intranet web page on the page.
I am using aspx page with vb code behind.
I can only see the server`s hostname, ip address and hostname. not the current pc`s
Can someone help me PLEASE and can it be done?
|
|
|
|
|
You get the user IP address from Request.UserHostAddress .
As long as the compuer is in the same local network as the server, you can get the computer name using System.Net.Dns.GetHostEntry(ip).HostName .
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I tried that and it keep on giving me the server`s ip and host name.
Is it maybe a permission setting?
I have changed “authentication methods “to “integrated Windows authentication”.
Still not working.
I have also tried.
- My.Computer.name
- System.Environment.machineName
- Microsoft.VisualBasic.Interaction.Environ(“Computername”)
No Luck
|
|
|
|
|
SAadmin wrote: I have also tried. Cry
- My.Computer.name
- System.Environment.machineName
- Microsoft.VisualBasic.Interaction.Environ(“Computername”)
No Luck
No wonder. All those get the name of the server.
What I showed you gets the ip address from the http header. If that would not be the ip of the client, the server would not be able to send the response back to the client.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Tanx !!!!!
IT WORKS
All I need nou is to show the OS and Service packs of the Computers
|
|
|
|
|
I have a user control called TabControl. In the same web site, I have a user control called GridTabPage. When I try and dynamically add pages, e.g. tcGrid is a TabControl.
tcGrids.TabPages.Add(new GridTabPage("One"));
tcGrids.TabPages.Add(new GridTabPage("Two"));
tcGrids.TabPages.Add(new GridTabPage("Three"));
I get told I'm missing a reference to a generated assembly. GridTabPage was not known, but as there are no namespaces in a plain ASP.NET web site, how could I make it known to the code? Easy, just also register it in the aspx!
Last modified: 1hr 56mins after originally posted --
|
|
|
|
|
hi
i am using master page
on content page i am writing Title of page
as fallows
Title="::LORDS INTERNATIONAL-VIEW SITEMAP::" %>]]>
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server" xmlns:asp="#unknown">
But after uploading this page title bar display website url/page name
what is problem
plz help me
krishna veer singh
|
|
|
|
|
This might help.
<![CDATA[<%@ Page Language="VB" MasterPageFile="~/Lords_MasterPage.master" AutoEventWireup="false" CodeFile="Sitemap.aspx.vb" Inherits="Sitemap" Title="::LORDS INTERNATIONAL-VIEW SITEMAP::" %>]]>
It's how I'd do it in a C# site - I can't see it being any different in VB.NET (although I stand to be corrected). Basically, remove the CDATA definition.
|
|
|
|
|
I've had this problem too, the title is lost b/c of the master page, I believe. I am going to set it in javascript, I just haven't got around to it.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I think Pete's right, just remove the CDATA wrapper, it is not necessary. I have this sort of thing all over my website:
<%@ Page Language="C#" MasterPageFile="~/MasterPageSoftware.master" AutoEventWireup="true" CodeFile="calm.aspx.cs" Inherits="calm" Title="nov8r.com - CALM - Peace of Mind for .NET Applications" %>
and the titles appear correctly - see http://www.nov8r.com/calm.aspx[^]
|
|
|
|
|
hi
In my webpage i have used adrotator and in my xml file i used swf.i made my swf like button so that when i clicked on swf file then i navigate the specified url.that navigate url was set in swf.Is there any way so that i can set that navigateurl from my aspx page or from code.
Thank you....
PadmaDarji
|
|
|
|
|
How to use SID Like Windows authentication User?
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
If I add a "PageName" property to a user control, I can add that property as an attribute when declaring an instance of this user control in a tag. Now what if I wanted to add a "Pages" collection to a user control, and declare a collection of Page objects as sub-elements of a user control tag, much like the "Columns" collection element of a GridView control. How could I do this?
|
|
|
|
|
using the PersistanceModeAttribute
I have a button in my app which works like a menu. ie, when you click it it pops up a menu of items.
I have a MenuItem defined:
public class MenuItem
{
public string Text { get; set; }
public string CommandName { get; set; }
public string CommandArgument { get; set; }
}
and on my Control I define the property like this:
private List<menuitem> items;
[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public List<menuitem> Items
{
get
{
if (this.items == null)
this.items = new List<menuitem>();
return this.items;
}
}</menuitem></menuitem></menuitem>
now my markup looks like this:
<sb:MenuButtonControl ID="mbAdd" runat="server" OnCommand="Add_Command">
<sb:MenuItem CommandName="Add" Text="Add New" />
<sb:MenuItem CommandName="Search" Text="Add Existing" />
</sb:MenuButtonControl>
the only other thing I do is override CreateChildControls on my main control and physically create my controls from the list of MenuItems (in my case I create LinkButton's for each menuItem and add them to the ControlsCollection )
|
|
|
|
|
Thanks, I'm getting started, but I'd like to have a 'MenuItems' tag within which I place the menu items, in your context. Using 'InnerProperty' for the collection gives me this, but how do I associate 'children' with this property?
|
|
|
|
|
Sorry, I was looking at the wrong class in my project for the example. change the attributes to this:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.InnerProperty)]
|
|
|
|
|
I'm building a Tab Control using a MultiView and Menu control. I need to be able to dynamically add tab pages to this control, and I would rather add instances of my own TabPage user control, built on a View control. How could I achieve this? Can View controls in a MultiView be nested in other controls in some way?
Duh I'll just put the TabPage controls inside the view controls, not comprise them of View controls.
|
|
|
|