|
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
|
|
|
|
|
well from your code I couldn't understand where and how your are adding the event handler to the dropdownlist. You have to add the event handler to the dropdownlist, you can do it in multiple ways one of them is to do in the aspx page like
<asp:dropdownlist id="ddl" runat="server" onselectedindexchange="ChangePage"></asp:dropdownlist>
do this and see if it helps
-----
|
|
|
|
|
I have a simple web site written entirely using ASP.NET 2.0. I'm seeing some very weird URLS in my server logs. Here's an extract from today:
1 http://www.intonet-technology.co.uk/(X(1)S(j4kgykmhswm0hy45oo4yu5ni))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(np5ip2ffrq5zpa455wbgem45))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(pmpsrw45lxwqc5aa23mqy4np))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(gsqxw145kzj1c53nttxcap45))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(mlyu3sfl01dwbyegilpvsrz0))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(brkgw4y4dxr45h55urrdhx45))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(rds3dl552lngp4blc0xei245))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(gk4n3i55tsstta55aafcn2n3))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(ejn5mu45y4nsyzukabzn4orw))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(youl1fjghdcon355o0faji55))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(klfvj555jytwl355yfedvc45))/Default.aspx
Can anyone explain what the (X(1)S(blahblahblah)) bit is all about?
- Tim Skipper
|
|
|
|
|
How come that almost every time someone post about something "very strange", it is not strange at all...
The site is using cookie-less sessions, which puts the session id in the url.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Thanks for the prompt answer! It's been infesting my Google listings which is the most annoying thing.
|
|
|
|
|
Hi,
I have a problem with me..If a user is timed out i mean session time out..user redirect to some page ssay, timeout.aspx page.....in my case once user came into this page user will click the browser back button and see the previous pages..i want to avoid that ie,,once user came into timeout.aspx page he can't see the previous pages....
Can anybody give a solution for that...it's very important for me...
Thanks & Regards
alex.
The code i am using is
window.setTimeout(\"window.location.replace('SessionTimedOut.aspx')\"," + (Session.Timeout * 60000) + ");
|
|
|
|
|
you can disbale the client-side caching using the following code
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi,
Thnaks for your reply....but i didn't get the result...please help me...
The code that you gave is put it in my timedout.aspx page...is that ok....
regards
alex.
|
|
|
|
|
You can put that in a common base class(if you have one in your application) which is inherited in all the page so that client-side caching will be disabled for the whole application. or you can put in the page that you don't want to cache on the client-side.
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Thanks it's working in IE,,not in mozilla...any idea about that....
alex
|
|
|
|
|
No Idea
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi,
I'm writing some excel data to dataset(asp.net 1.1 with c#). In one of the columns of the excel has both numeric and alphabetic characters. While reading it is reading only numeric ones, whereas alphabetic are going as null. So I modified the connection string as follows:
strConnectionString="Provider=Microsoft.Jet.OleDB.4.0;Data Source=" +strFolder+strFileName+";Extended Properties=Excel 8.0;HDR=NO;IMEX=1";
When I done this, I'm getting the error 'Couldn't find installable ISAM Driver'. I have made necessary changes in registry also. I have googled about this error and got some info from Microsoft site. But even after doing all these, issue still persists.
(i) Any idea how to resolve this issue?
(ii) Or is there any other way I can read both the numeric and alphabet characters to the dataset?
Any help in this regard would be great.
Thanks
Meeram
Meeram395
|
|
|
|
|
I am displaying some information using a datagrid, one of the columns is a date column.
The date displays but it also displays the time like this 15/11/2007 00:00:00.
Is there anyway to get rid of the time protion and just disply the date?
Thanks,
macca
|
|
|
|
|
If it's a BoundColumn then you can set the DataFormatString property of the column to {0:dd.MM.yyyy}
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Try following code
Text='<%# Eval("DateField","{0:dd:MM:yyyy}")%>'
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thanks guys
I got this sorted, had to set HTMLEncode to false
macca
|
|
|
|
|
Hi All.
I am doing Infor Show about Security.
I using datagrid to show information Security of companys.
My datagrid must auto update new data from database after 10 secords and show new data.
I have one solution is using tag <meta>.But it is not good because my datagrid using tag <maquee> to move scroll data in datagrid. finish I using ajax pro to implement.
But I meet problem.
1. I can't binding new data to grid in code because
when My code receive new dataTable from database then immediate return this data to Request from client. So, it can implement command binding data grid.
Now I need bind new data in to datagid . I hope everybody help me.
My code in server side:
<br />
1.regist:<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{ AjaxPro.Utility.RegisterTypeForAjax(typeof(InfoShowTV.ShowHOSE_HASTC));<br />
} <br />
<br />
2.method:<br />
[AjaxPro.AjaxMethod]<br />
public void LoadDataToGridViewHASTC()<br />
{<br />
ClsHOSE_HASTC ObjectConnection = new ClsHOSE_HASTC();<br />
DataTable dtHASTC = ObjectConnection.getViewHASTC(); GrdHASTC.DataSource = dtHASTC; <br />
GrdHASTC.DataBind(); <br />
}<br />
In this code: it can't run command : GrdHASTC.DataBind()
it only run to command :DataTable dtHASTC = bjectConnection.getViewHASTC()
Call in Client:
<br />
function Test1(){ <br />
InfoShowTV.ShowHOSE_HASTC.LoadDataToGridViewHASTC(); <br />
} <br />
window.setInterval(Test1,10000);<br />
Hope you help me.
I hope you tell any solution for problem.
thanks you very much.
|
|
|
|
|
hi all,
my problem is the following:
i have a custom webcontrol in a file named PK_LanguagePicker.ascx, that is in a custom created namespace named HMC.CustomControls.
Now in my masterpage, in code behind, i can reach the control through the namespace fine.
But when i try on my Default.aspx page, in code behind, i cannot see the namespace and control
how can that be?
hope that you can help
/Christian
|
|
|
|
|
Hi everyone,
Im going to do an application where i store some video files in a folder.And in my form i list out them.Need to play selected video in the browser..
Anyone has got idea on how to play a videofile in browser?
Thanks in advance... (
|
|
|
|
|
The easiest way is that upload your file to some videos sites and get the embedded code and use it in your webpage.. (Like posting the Youtube video on your blog)
If you don't want to upload your video file to those video sites, you can probably use Windows Media service or etc.. but if your site is published on ASP.NET host, you should contact with your hosting service provider for asking whether they support the Media Streaming Service or not. AFAIK, there are some hosting companies that doesn't support the Media Streaming Service to the Shared Host customers... If your hosting support the media streaming then they will have the documentation about how to upload the video files and how to display in your website... Actually, we can't give you that much advices since the way of doing this might be differ from one hosting to another for the shared host users.
If you wanna test the Video steaming locally, you can google about this.. asp.net video streaming
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Thanks a lot for ur suggestions...
|
|
|
|