|
How to move to next record in a .net as there is no option movenext in .net. please tell me some option for movenext using dataset in same page ??
-- modified at 0:18 Wednesday 19th July, 2006
|
|
|
|
|
|
I have a loop to send aysn message to different clients as below.
but even if all the clients are online and the configuration of all the clients are the same, I can only received a part of responses from clients.
Would you pls give me some suggestion about this problem?Thank you
code below------------------------------------------------------------------
foreach (IPEndPoint endPoint in this.endPoints)
{
try{
udpClient = new UdpClient();
udpClient.Connect(endPoint);
udpClient.Send(buf, length);
udpClient.BeginReceive(new AsyncCallback(ReceiveCallback), new UdpState(udpClient, endPoint));
}
catch (Exception ex){
}
----------------------------------------------------------------------------
Sincerely,
WeiYu Wang
-- modified at 18:09 Tuesday 18th July, 2006
|
|
|
|
|
Hi,
I place the adrotator control on my page.when i refresh the page the image get changed,but it's not changed automatically.
How to change the image in Adrotator automatically without refreshing the page?
Thanks in advance
|
|
|
|
|
hi
adrotator script in .NET is based on page refreshes.
In order to refresh or change the advertisement automatically, you will have to load images at page load and change tham using javascript.
Or you can use iframe and refresh that again and again .. which ever u find suitable.. and yes you can use AJAX too.
Thanks,
Sushant Duggal.
|
|
|
|
|
Hi,
I have an .aspx page. It plays a video stream using media player object. The page also got a TreeView control. The problem is that when I expand or collapse a tree node the streaming stops.
Does anyone know the reason for this or know how it can be solved?
Thanks,
A7mad
|
|
|
|
|
Are you posting back when the tree changes? If so, the whole page will be re-initialised.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi,
Can I have different collapse/expand images for a TreeView control at the same time?
I mean, for example, can one node in the tree has its expand image as a plus sign and another one has its expand image as a triangle?
I'm asking this as all I can find is that the TreeView only has one property for all expand images in the tree.
Thanks,
A7mad
|
|
|
|
|
Not unless you write a custom control to support this.
|
|
|
|
|
Hi ,
I am Ravindra.Currently doing a project in ASP.net.
I want to place rotating adds in my website.
if any body know pls help me(if possible send me the code)
Ravindra
Ravindra
|
|
|
|
|
AdRotator control need source, so add to Your project new item Xmlfile. Edit your Xmlfile, I named it file.xml :
<Advertisements>
<Ad>
<ImageUrl>images/DVD.gif</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>Dvd</AlternateText>
<Keyword>Computers</Keyword>
<Impressions>10</Impressions>
</Ad>
<Ad>
<ImageUrl>images/gates.gif</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>Young Bill</AlternateText>
<Keyword>Computers</Keyword>
<Impressions>10</Impressions>
</Ad>
<Ad>
<ImageUrl>images/java.gif</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>Java</AlternateText>
<Keyword>Computers</Keyword>
<Impressions>10</Impressions>
</Ad>
</Advertisements>
In your .aspx file [Source]
<asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/file.xml" BorderWidth="1" />
Have fun
StonePit
-- modified at 14:30 Tuesday 18th July, 2006
|
|
|
|
|
I have to provide download from ASP.NET 2.0 web page. I have following code
objFileInfo = new FileInfo(filePath);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + objFileInfo.Name);
Response.AddHeader("Content-Length", objFileInfo.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(GetFileContentsAsByteStream(filePath));
When I use this, i am able to see a popup saying OPEN/SAVE/CANCEL. If I click on SAVE, the file gets saved at selected location. If I select OPEN, it shows that it is downloading file, Then it opens respective application to open downloaded file. But at this time the application says, file not found.
Has anyone have idea what could be the reason and how can I get the file open.
Thanks in advance.
- ashish
|
|
|
|
|
Try this. In this case file must be in root of your website.
string filename = "somefile.doc";
if (filename != "")
{
string path = Server.MapPath(filename);
System.IO.FileInfo file = new System.IO.FileInfo(path);
if (file.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(file.FullName);
Response.End();
}
else
{
Response.Write("File does not exist!!");
}
}
StonePit
|
|
|
|
|
Thanks for your help.
The restriction with me is, I cannot keep file in root as I receive file from different server. What will be receiving is the byte stream of the file.
Will it be possible to remove OPEN button of the download popup? [incase it is mandatory to have file sitting in root folder.]
- ashish
|
|
|
|
|
i have a datagrid with multiple combo boxes .on selecting a particular option from the list a button need to appear beside the corresponding combobox otherwise(for any other option) button should be not visible on the datagrid...
how can i do this??????
Can anyone please help.....
divya
|
|
|
|
|
Here you need to be little tricky ,
you can add attribute OnChange="SomeJsFunction(this)", This will pass the combobox object and you can get the Seource Combo box ID.
Now the trick is like this when ever you put some control in grid by frgault its ID changes like "GataGridID_ctrl2_comboboxid"
the initial part "GataGridID_ctrl2_" is common for all control in same row so if you want some button ID you could write
var buttonid = "GataGridID_ctrl2_"+"buttonID"
by this ID you can get the object using getElementByID()
and then can make it visible or hide
Nobody is perfect i'm Nobody
|
|
|
|
|
Hi all,
I've been looking through some simple Atlas samples but can't seem to get anything up and running. Heres the code (hopefully someone can help me out). I have a .aspx page which simply displays a message on a button click. The two errors are highlighted below. The first states i need a ';' and the second tells me that AtlasBook is undefined.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestAtlasNamespace.aspx.cs" Inherits="TestAtlasNamespace" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function Button1_onclick() {
var testCar = new AtlasBook.Car('Honda', 'Pilot', '2005');
alert(testCar.getMakeandModel());
alert(testCar.getYear());
return false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<atlas:ScriptManager ID="ScriptManager1" runat="server">
</atlas:ScriptManager>
</div>
<script language="javascript" src="AtlasBook.js" type="text/javascript"></script>
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
</form>
</body>
</html>
Here's the javascript file,
Type.registerNamespace("AtlasBook");
AtlasBook.Car = funtion(strMake, strModel, strYear) {
var m_Make = strMake;
var m_Model = strModel;
var m_Year = strYear;
this.getMake = function() {
return m_Make;
}
this.getModel = function() {
return m_Model;
}
this.getYear = function() {
return m_Year;
}
this.getMakeandModel = function() {
return m_Make + ' ' + m_Model;
}
this.dispose = function() {
alert('bye ' + this.getName());
}
}
Type.registerClass('AtlasBook.Car', null, Web.IDisposable);
Thanks in advance for any help. I hope I made sense!
|
|
|
|
|
richiemac wrote: AtlasBook.Car = funtion(strMake, strModel, strYear)
func tion
richiemac wrote: Type.registerClass('AtlasBook.Car', null, Web.IDisposable);
Depending on which version you are using, it can be Sys.IDisposable
|
|
|
|
|
What an idiot I am!!
I knew it would be something trivial.
As for the Web vs Sys situation. How can I find out what version is being used so I know which to use.
Oh and thanks for the help dude.
|
|
|
|
|
richiemac wrote: As for the Web vs Sys situation. How can I find out what version is being used so I know which to use.
The Web.xxx has been changed to Sys.xxx since the release of the Atlas March CTP. You can see the Atlas Runtime version in the AtlasRuntime.js (or Atlas.js).
Also, you can register a class in the new form classname.registerClass('classname',...) :
AtlasBook.Car.registerClass('AtlasBook.Car', null, Sys.IDisposable);
|
|
|
|
|
Ahhh!
That seems to have sorted out the problem with inheritance that I was having. You're one step ahead of me.
Nice one buddy!
|
|
|
|
|
How can I change the label in client side.
for eg. if the user enter the cost, tax, discount, and quantity it must display the unit price.
Pls help!
|
|
|
|
|
The Label control renders to a span element at the client side, you can get reference to it with the getElementById method, then change the innerHTML/innerText property.
|
|
|
|
|
Hi
Is there any free smtp server which i can use in my ASP.net code
SmtpMail.SmtpServer = "thirdparty smtp"
My website mailsending is working in my machine(windows xp)
with
SmtpMail.SmtpServer = "localhost"
When i deployed it to server with Windows 2003 server . There is some problem in mail sending.
Error Showing
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access is denied. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at EMailSample.SendMailIDS.btnSend_Click(Object sender, EventArgs e)
How can i solve this problem.
-- modified at 10:17 Tuesday 18th July, 2006
|
|
|
|
|
Make sure the service "Simple Mail Transfer Protocol (SMTP)" is running.
|
|
|
|