|
amaneet wrote: I am posting this question third time and i will continue posting this question until i get the answer.
Hmmm, you are patient enough or lazy enough as you can spend your time on findind a solution instead of keeping posting this simple question.
Well, you are calling the LoadTable method in the data binding expression and the method returns an object of the HtmlTable type, so the type name of the method result object (System.Web.Ui.HtmlControls.HtmlTable) should be displayed in the web page. Here, you may have a couple of simple solutions:
+ In the LoadTable, you can render the HtmlTable object and send the output html markup as the method result.
+ In the ItemDataBound event handler of the datagrid control, you can call the LoadTable method and attach the table to the specified cell of the row.
+ Intead of building a dynamic table, you can use another datagrid in the EditItemTemplate.
|
|
|
|
|
Sir,
Can u send some code for that .Thanks for ur attention.
|
|
|
|
|
Can any one help me How to get Error message using Error No When Sql Exception is raised
|
|
|
|
|
If you want to get the error no. in sqlserver then @@Error will give you the error no.
Best Regards,
Apurva Kaushal
|
|
|
|
|
My question is when we get sql exception in Asp.net
we can obtain error number using Number property of SqlException
How to get error message at runtime using this error number
|
|
|
|
|
I'd like to output some information from a database to a datagrid on a webpage using visual basic. The program I'm using is asp.net web matrix. How do I link them? Thanx in advance.
-- modified at 0:30 Wednesday 19th July, 2006
|
|
|
|
|
|
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
|
|
|
|