|
Hi,
I have a repeater and bound one of my tables to it. This table has a boolean value (true/false). I don't want that to be displayed as true/false on my webpage. Is there a way of changing it? It is currently displaying true/false.
Thanks.
Desmond
|
|
|
|
|
u cant add column to the DataTable and then put the table into for loop
if(dt.Rows[i][0]=="True")
{
dt.Rows[i][NewColumnIndex]="WhatEver";
}
else
..........
and u can delete the boolean column
regards
|
|
|
|
|
Hi:
i am getting below error message frequently. please hep me out on this.
thanks in advance.....
Exception of type System.OutOfMemoryException was thrown.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.]
[HttpException (0x80004005): Exception of type System.Web.HttpException was thrown.]
System.Web.HttpAsyncResult.End() +54
System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar) +18
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +80
|
|
|
|
|
|
Hi,
I am using asp.net, C# (visual studio 2005).
I have made one search form where I display large size image along with data.
My problem is when I export it to excel. Picture exported to I think on first cell.
Please suggest me some idea how can I rectify it.
Or is there better way available. Like exporting to word or pdf . if so please provide me some good link.
Please guide me
Thnks
imaran khan
|
|
|
|
|
Dear all,
I had used partial class to extend typed dataset(ex. add a method to TypedDataTable) in my windows-base applications and it works well.
But when I try it in a web services project, those extend functions which is visible within web project, but invisible to client.(I create a windows-base application then add web references point to that web project, client application will not be able to use extend function, properties etc.)
Is it true that Extending a Typed DataSet Using Partial Classes is not available in Web Services Project ?
Or is there anyway to enable it ?
Thanks for help.
|
|
|
|
|
Hi,
How can I use the autocomplete capability of dropdownlist in web application,
so that When I type in it, the math item brings up.
Best wishes
|
|
|
|
|
I don't thnk there's a control built in for this, but I suspect the ASP.NET AJAX library would have one.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
mehrdadc48 wrote: How can I use the autocomplete capability of dropdownlist in web application,
so that When I type in it, the math item brings up.
Dropdownlist?
I think this feature is already supported in firefox, IE7.
One people asked us about that in forum. You can check here.
Solution for IE6.
<script language="javascript" type="text/javascript"><br />
var pressedKeyString = "";<br />
var delay = 1000;<br />
var timeID = null;<br />
function move(){<br />
<br />
var selectList = document.getElementById('DropDownList1');<br />
var arr = new Array();<br />
<br />
var idx = 0;<br />
<br />
for(var i = 0; i < selectList.options.length-1; i++){<br />
if(selectList.options[i].value.length >= pressedKeyString.length){<br />
if(pressedKeyString.toLowerCase() == selectList.options[i].value.substring(0,pressedKeyString.length).toLowerCase()){<br />
selectList.selectedIndex = i;<br />
i=selectList.options.length;<br />
<br />
}<br />
}<br />
}<br />
<br />
pressedKeyString = "";<br />
}<br />
<br />
function foo(e,id){<br />
if(timeID != null)clearTimeout(timeID);<br />
timeID = setTimeout("move();",delay);<br />
<br />
var key;<br />
if(window.event)
{<br />
key = e.keyCode<br />
}<br />
else if(e.which)
{<br />
key = e.which<br />
}<br />
<br />
var pressKey = String.fromCharCode(key);<br />
pressedKeyString += pressKey;<br />
<br />
<br />
<br />
}<br />
</script><br />
<br />
<br />
DropDownList1.Attributes.Add("onkeypress", "foo(event,'" + DropDownList1.ClientID + "');");<br />
<br />
List list = new List();<br />
list.Add("Alien");<br />
list.Add("Emos");<br />
list.Add("Emos2");<br />
list.Add("Poker");<br />
list.Add("Peter");<br />
list.Add("Michael Sync");<br />
list.Add("Petro");<br />
list.Add("Pet");<br />
list.Add("Elizabeth");<br />
list.Add("Kiran");<br />
list.Add("Kate BackInSales");<br />
<br />
DropDownList1.DataSource = list;<br />
DropDownList1.DataBind()<br />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi there
i have a asp.net app and i can;t make it work on my machine
IIS is working
SQL server 2000 is on
i have attached the database through visual studio 2003 i have access to it but in thew servers panel i get data source not found
though i can modify my db and i can browse the .aspx files but ofcourse i have no communication with the database,so nothing works...
i 'm fresh to asp and i really need your help
thanks
ninja coding
|
|
|
|
|
i couldnt get your quiestion.. expplain wat u did?
Sarith...
|
|
|
|
|
i connected to the database regularly ok ?added the database through server explorer
the connection string sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
and
<add key="CONNECTION_STRING" value="workstation id=xrono;packet size=4096;data source=XRONO;integrated security=SSPI;persist security info=False;initial catalog=Course_Data">
and i get "data source not found" right below my SQL Server name ,in the Server Explorer[v.Studio 2003]
i use Windows Authentication
Where did i go wrong?
PLease help
Thanks
ninja coding
|
|
|
|
|
did u tried data source= localhost
Sarith...
|
|
|
|
|
did u tried data source= localhost
and why u r trying to give conection through server explorer do it using code.
Sarith...
|
|
|
|
|
localhost was the first thing i tried
i showed u the code in webConfig ,what do u mean?
ninja coding
|
|
|
|
|
how can i post an img in the message to show u what i mean??
i tried it doesn't work
ninja coding
|
|
|
|
|
I was wondering if anyone has any expience with source control options when developing an ASP.Net/ASP website. We currently use Frontpage server extensions (which with 11 developers) is starting to show strain.
We need something that works in the same way as FPSE because of the size of the website / integration of ASP (means it is not possible to have it checkout completely to our local machines for developing)
We use VSS for small Ofshoot projects and inhouse tools.
Thanks!
|
|
|
|
|
VSS is fine, as is VSTS.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
We cant really afford VSTS - its mega expensive... and VSS is a good method, except that is there a way of having a website run - and when a file is checked in automatically updating it so that there is effectivly a website running off the project in the vss database?
Thanks,
|
|
|
|
|
I want to use embedded Window Media Player functions like stop(), pause() in Firefox. Does anyone have an idea?
I checked following two ways. They are working good in IE6 and IE7 but not in Firefox.
(1) document.Player.controls.pause();
(2) document.getElementById("Player").controls.pause();
Please tell me a solution in Firefox. Thanks.
Abuabakr
|
|
|
|
|
Why do you wanna add this from Javascript?
If you are embedding Windows Media Player Object in WebPage, all buttons (play,pause,stop and etc) are already included in that object. So, I don't think you need to add this duplicated features from Javascript..
You can check the screenshot here.
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="mediaplayer1" ShowStatusBar="true" EnableContextMenu="false" autostart="false" width="320" height="240" loop="false" src="MyVideo.wmv" />
Ref: Embedding Windows Media Player into a web page
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thanks for you reply.
The thing is I need player in a complete different way. Infact I want to implement a technique which doesn't work with normal player that's y I added a layer on player and then control its functions. I have finished everything and its work great in IE6 and IE7 but not in Firefox.
So I just need a button or image where I can call player functions "onClick" event.
Thanks.
|
|
|
|
|
This code has been checked in IE6, IE7 and Firefox and it works perfectly in all of them.
Here is the Javascript code which you need to put within <script> tag.
var req;
var isIE;
function initRequest() {
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
isIE = true;
req = new ActiveXObject("Microsoft.XMLHTTP");
}
}
//url will be Web Service URL.
function CallWebService(url,params)
{
initRequest();
req.onreadystatechange = processRequest;
req.open("POST", url, true);
if(params!=null)req.setRequestHeader("Content-length", params.length);
req.setRequestHeader("Connection", "close");
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send(params);
}
function processRequest()
{
if (req.readyState == 4)
{
if (req.status == 200)
{
var message = req.responseXML; //Result in XML.
// Accessing the tag 'string' is name of node
var myNodes=message.getElementsByTagName("string");
// Getting actual result of webservice and saving it in a variable which can be use anywhere in page.
// alert("Result of webservice is : "+myNodes.item(0).firstChild.nodeValue);// Checking result
var serviceValue=myNodes.item(0).firstChild.nodeValue;
}
}
}
Here is the Html code which you can put within <body> tag.
<%--<input type="button" value="Call .NET Web Service!" onclick="CallWebService('http://pathOfYourServer/nameOfWebService.asmx/testWebService1',null)" />
<input type="button" value="Call .NET Web Service with parameters!" onclick="CallWebService('http://pathOfYourServer/nameOfWebService.asmx/testWebService2','a=Michael&b=5')" />
You can also pass dynamic values like below
CallWebService("http://pathOfYourServer/nameOfWebService.asmx/testWebService2","name1="+value1+"&name2="+value2+"&name3="+value3+"")
where name(1,2,3) is the name of your variable and value(1,2,3) is value of respective variable.
Note: Number of variables you pass in above line must be same as you defined in the definition of webservice.
Here is the webservice code which you need to enter in your webservice file.
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
///
/// Summary description for WebService
///
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebService : System.Web.Services.WebService
{
public WebService ()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string testWebService1()
{
return "Hello World ";
}
[WebMethod]
public string testWebService2(string a,int b)
{
return "Hello World " + a + " - " + b.ToString();
}
}
Hope it help.
Thanks to Michael
Regards,
Abubakar
rega
|
|
|
|
|
Cool..... I glad to hear that your problem is solved....
As I suggest you earlier, if you are working for large Ajax-enabled project, you may probably want to use Javascript Ajax framework (eg: prototype js library) or ASP.NET Ajax...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I already voted your message.
I posted a new message in forumn, may be you already read it if u didn't I am repeating here again. if you know its answer please reply its answer. Thanks.
QUESTION
I want to use embedded Window Media Player functions like stop(), pause() in Firefox. Does anyone have an idea?
I checked following two ways. They are working good in IE6 and IE7 but not in Firefox.
(1) document.Player.controls.pause();
(2) document.getElementById("Player").controls.pause();
Please tell me a solution in Firefox. Thanks.
Abuabakr
|
|
|
|