|
xkrja wrote: But if I upload the .aspx-file to my web domain and then try to run it doesn't work.
Is ASP.NET registered in IIS? You can check this by bringing up the properties for your virtual directory and looking for an ASP.NET tab. If it isn't run the aspnet_regiis utility (you can find it where the .NET framework is installed) with the -i switch to register it.
xkrja wrote: How should I name my ASP-application so that I only need to type "http://www.mydomain.com" to open my site?
Define default page names in IIS. The standard default page names are things like default.aspx, index.aspx etc.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Doen your domain runs windos server 2k3?
In the WebServer page there are some xtra settings to set to make the webserver run aspx-files.
In the section Web Service Extensions
set Active Server Pages to prohibited
Set any ASP.NET vX.y.zzzz to Allowed.
|
|
|
|
|
I have some required field validators in one column for editing actual hours. However, I am trying to update this, and I am databidning the control in postback and !PostBack. However, it does not seem to matter about the validation controls. When I try to update, I get this error:
Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true"> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Please help.
|
|
|
|
|
Hello,
Thank you for reading. Here is my situation. I have a web service that takes as input user name and password, that returns an xml document..if all credentials match the document contains info about the user something like this
<ROOT>
<CustomerID>123456</CustomerID>
<FirstName>Tester</FirstName>
<MiddleName />
<LastName>Abc</LastName>
<DisplayName>Tester Abc</DisplayName>
</ROOT>
else it has
<Root>
<Error>Invalid Login</Error>
<Root>
when I get the xml document in my application, how can I check if <Error> is present in the xml document? Also I want to get the value of the error as string. Please Help
RH
|
|
|
|
|
open the xml file using XMLDocument something like this..
<br />
XMLDocument doc = new XMLDocument();<br />
<br />
doc.Load(xmlfilenamewithpath);<br />
<br />
XMLNode node = doc.DcoumentElement.SelectSingleNode("Root/Error");<br />
<br />
string err;<br />
<br />
if(node != null)<br />
err = node.InnerText;
-----
|
|
|
|
|
|
I googled and couldn't find anything. What I need to do is write the following using ASP.NET:
<br />
<script type="text/javascript"><br />
var linkset=new Array()<br />
<br />
linkset[0]='<a href="http://dynamicdrive.com">Dynamic Drive</a>'<br />
linkset[0]+='<a href="http://www.javascriptkit.com">JavaScript Kit</a>'<br />
linkset[0]+='<a href="http://www.codingforums.com">Coding Forums</a>'<br />
linkset[0]+='<a href="http://www.cssdrive.com">CSS Drive</a>'<br />
linkset[0]+='<a href="http://freewarejava.com">Freewarejava</a>'<br />
<br />
linkset[1]='<a href="http://msnbc.com">MSNBC</a>'<br />
linkset[1]+='<a href="http://cnn.com">CNN</a>'<br />
linkset[1]+='<a href="http://news.bbc.co.uk">BBC News</a>'<br />
linkset[1]+='<a href="http://www.washingtonpost.com">Washington Post</a>'<br />
</script><br />
It's a pop-out menu and I want the menu and it's sub links (the ones above) to be dynamic aswell. Can this be done?
-- modified at 13:29 Thursday 15th November, 2007
|
|
|
|
|
build a string with exactly what you have in the javascript and then user ClientScript.RegisterScript to register from the server to the client
-----
|
|
|
|
|
Name "ClientScript" is not declared
|
|
|
|
|
It is SO disturbing to me the number of people here incapable of using a provided solution if one little step is assumed. Did you try to google the keywords in the reply you got, in order to find out where the ClientScript object exists ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes I ClientScript.RegisterScript: I got five results, two were in chineese. I actually mis-understood by supervisor's clear as mud instructions and I no longer need to write javascript with ASP.NET
|
|
|
|
|
OK - a google lesson. Try ClientScript RegisterScript ( remove the . ) and you'll get tons of results.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ClientScript.RegisterClientScriptBlock
-----
|
|
|
|
|
Jordanwb wrote: Name "ClientScript" is not declared
If you are using framework 2.0 or later, it's declared in the Page class.
As you didn't specify what you are using, it's usually assumed that you are using a reasonably recent version. If you for example is limited to use framework 1.1, you should specify that in your question.
In framework 1.1 you would use the Page.RegisterClientScriptBlock method instead.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi All,
Is there a version of Microsoft.Web.UI.WebControls.dll for visual studio 2005. When I use it for v1.1 .net framework it works fine, but is not working on v2.
Thanks
Ben
|
|
|
|
|
are you talking about System.Web.UI.WebControls
-----
|
|
|
|
|
No, I am talking about the Microsoft.Web.UI.WebControls Assembly Reference.
I used to declare them as,
<%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
a few examples of them are:
TreeNode, TabStrip, Toolbar etc.
|
|
|
|
|
you can download it from here and then install it download
read more about it read more
-----
|
|
|
|
|
Thanks for that but it seems they work only under visual studio 2003.
I cannot get them on 2005.
regards
|
|
|
|
|
How can I return an array of strings from a web service?
I can return a string but returning an array doesn't work.
Thanks
|
|
|
|
|
dubbele onzin wrote: How can I return an array of strings from a web service?
Use the return keyword...
dubbele onzin wrote: I can return a string but returning an array doesn't work.
Yes, it does.
If you have any problem with it, what happens when you try? Do you get any error message?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I need to test if the textbox was found in the gridview.
<code> txt1 = gv1.Rows(gv1.EditIndex).FindControl("TextBox1")</code>
this is how I'm searching for it how can I see if the control textbox1 was found or not?
thx
BiG RaLpH
|
|
|
|
|
FindControl will return a null reference if no control with the specified name was found.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I have a application which plots google map in that.. From the window where map is drawn, i have uses a javascript menu.
When a menu option is selected a new window is showed as model dialoge window.
When i run this web application for some time, the whole application gets stucks and i need to close the internet explorer window, otherwise it will be showing busy all the time.
can any one tell me why this happens??
thanks for the help in advance
Regards
Hari
|
|
|
|
|
Hi,
I am working on mobile applications but I am using the selection list inside the Mobile web user control and use the list to navigate between pages. for instance, my selection list will contain the number of pages and if I select one page my form has to get the second page results. I added a SelectIndexChanged event to navigate to other page but its not hitting the event at all. Could anyone please tell me. I am having the selectionlist in the code behind file of my user control.
the user control and the form that I insert my user control like this;
UserControl.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PagingMenu.ascx.cs" Inherits="PagingMenu" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<mobile:panel id="pageMenu" runat="server" paginate="True">
Code behind of user control
protected override void OnPreRender(EventArgs e)
{
RenderTheContent();
base.OnPreRender(e);
}
public void RenderTheContent()
{
int _noOfPages = 1;
for (int i = 0; i < Request.QueryString.Count; i++)
{
if (Request.QueryString.GetKey(i) != "pi" &&
Request.QueryString.GetKey(i) != "pfn" &&
Request.QueryString.GetKey(i) != "actn")
{
Query += "&" + Request.QueryString.GetKey(i) + "=" + Request.QueryString[i].ToString();
}
}
if (Query.Length > 0)
{
Query = Request.Url.LocalPath + "?" + Query.Substring(1);
}
else
{
Query = Request.Url.LocalPath + "?";
}
// Gets the values from Query String
if (Request.QueryString["pi"] != null && Request.QueryString["pi"].ToString().Length > 0)
{
PageIndex = Convert.ToInt32(Request.QueryString["pi"]);
}
// Calculating number of pages
if (Total % PageSize > 0)
{
_noOfPages = Convert.ToInt32(decimal.Floor(Convert.ToDecimal(Total) / Convert.ToDecimal(PageSize))) + 1;
}
else
{
_noOfPages = Convert.ToInt32(Convert.ToDecimal(Total) / Convert.ToDecimal(PageSize));
}
slist = new SelectionList();
slist.SelectType = ListSelectType.DropDown;
//slist.SelectedIndexChanged
MobileListItem li = null;
string valueString = "";
for (int i = 1; i <= _noOfPages; i++)
{
valueString = "";
li = new MobileListItem(i.ToString());
for (int j = 0; j < Request.QueryString.Count; j++)
{
if (Request.QueryString.GetKey(j) != "pi")
{
valueString += "&" + Request.QueryString.GetKey(j) + "=" + Request.QueryString[j].ToString();
}
}
valueString = "?pi=" + i.ToString() + valueString;
li.Value = valueString;
slist.Items.Add(li);
}
slist.SelectedIndex = PageIndex - 1;
pageMenu.Controls.AddAt(0,slist);
}
public void ChangePage(object sender, EventArgs e)
{
Query += "&pi=" + slist.Selection.Value;
RenderTheContent();
}
MyForm .aspx
<%@ Register src="PagingMenu.ascx" TagName="PagingMenu" TagPrefix="uc2" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<mobile:form runat="server" id="form">
<uc2:pagingmenu id="PagingMenu1" runat="server">
<mobile:objectlist id="rptPublications" runat="server">
<devicespecific id="dspChkAcct" runat="server">
<choice>
<itemtemplate>
<mobile:link id="aViewTopic" runat="server" font-size="Small" breakafter="True/">
<mobile:label id="tpcDetails1" runat="server" font-size="Small" breakafter="True">
<mobile:label id="tpcDetails2" runat="server" font-size="Small" breakafter="True">
<%--<separatortemplate> --%>
Thanks in advance,
Aruna.G
|
|
|
|