|
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.
|
|
|
|
|
Hi , please i hae a question & i want you answer me please
asp.net is one of the different programming languages that i have learned this year ,i learned it myself , & saw videos & ...
but the problem is that i learned some of asp.net 2.0 not 1.1 & here in ma country we don't have VS 2005 yet , we have just VS 2003 so that mean i have to work with asp.net 1.1
when i tried to work with that stuff i found that many things in asp.net 2.0 do not exist in the previous version or if it is , the syntax is so different & i got a problem
now i ask you , if i instal .netframwork 2.0 & use VS 2003 can i work as i have asp.net 2.0 ? or there is not relashionship between the two things ?
thank you very much
try to be good if you can't be the best
|
|
|
|
|
The .NET 2.0 framework will run code compiled using VS 2003, however, because VS 2003 targets .NET 1.1 you will not be able to use any of the new features of the 2.0 framework.
Jim Conigliaro
jconigliaro@ieee.org
|
|
|
|
|
thnx man , don't you have a solution to that ?
try to be good if you can't be the best
|
|
|
|
|
No solution, it is what it is. While Microsoft was very careful to make the .NET 2.0 framework backward compatible, it would have been physically impossible to make VS 2003 forward compatible. Until VS05' is available to you, you are going to be stuck using the 1.1 framework for development.
Jim Conigliaro
jconigliaro@ieee.org
|
|
|
|
|
but this is the problem ,,
VS 05 is not avaible to me right now cuz we don't have it yet here
we have just VS 2003 , & i feel so bad working with that stuff cuz 2.0 is a little easier & more clear
thank you anyway , you are great man thnx for your help
try to be good if you can't be the best
|
|
|
|
|
Download VS Web Developer 2005 Express Edition it's free.
StonePit
|
|
|
|
|
i already did , but when i finish my application i can't deploy it because ity doesn't has the configuration project
do you have a sugestion
try to be good if you can't be the best
|
|
|
|
|
I have a solution - i can place vs2005 on ftp and you will download it...
With best gr shmAlex
|
|
|
|
|
cool but so crazy
thank you very much i will download it just give me the link of that ftp
thank you
try to be good if you can't be the best
|
|
|
|
|
Hi , can you do this favor for me please ? i appriciate your help please place it in that ftp & give me the link
thnx
try to be good if you can't be the best
|
|
|
|
|
Hi ,
to send data through a hyperlink in asp.net 2.0 , there is a propriety called NavigateURL where you can involve the data you want to send
e.g :
in the navigateURL propriety you write this
page1.aspx?value=Amine
whith this statement you send the value "Amine into page1 through the hypelink , so when you click this hyperlink you can see the "Amine" value shown in a label in page1 isn't it ?
label1.text = request.item(value).tostring()
if the line over is false don't matter i just forgot how to request it & i can review my courses , the neccessary is to know how can i send something like that in asp.net 1.1
thank you very much
try to be good if you can't be the best
|
|
|
|
|
You just have to aasign the querystring value with the navigateURL property of the hyperlink. Same thing what you have done here.
Best Regards,
Apurva Kaushal
|
|
|
|
|
are you sure it will work in asp.net 1.1 ?
i think i tried it & it doesn't work
well i will ry again but please can you make sure of this ?
try to be good if you can't be the best
|
|
|
|
|
Yes i am quite sure of it. You just put a hyperlink control in a page and just set the navigateurl property of that.
The control in html will look like this.
<code><asp:HyperLink id="HyperLink2" style="Z-INDEX: 103; LEFT: 264px; POSITION: absolute; TOP: 240px"
runat="server" NavigateUrl="iframe.aspx?Value=kaushal" Height="32px" Width="192px">HyperLink</asp:HyperLink></code>
Best Regards,
Apurva Kaushal
|
|
|
|
|
If u want to transfer the values from one page to another u can either use server.transfer method or u can use response.redirect method with strings of values attached which u want in the other page. i will give sample code.
Source Web Form
private void Button1_Click
(object sender, System.EventArgs e)
{
string url;
url="anotherwebform.aspx?name=" + TextBox1.Text + "&email=" + TextBox2.Text;
Response.Redirect(url);
}
Destination Web Form
private void Page_Load
(object sender, System.EventArgs e)
{
Label1.Text=Request.QueryString["name"];
Label2.Text=Request.QueryString["email"];
}
Or
Source Web Form
Add following properties to the web form:
public string Name
{
get
{
return TextBox1.Text;
}
}
public string EMail
{
get
{
return TextBox2.Text;
}
}
Now, call Server.Transfer.
private void Button1_Click
(object sender, System.EventArgs e)
{
Server.Transfer("anotherwebform.aspx");
}
Destination Web Form
private void Page_Load
(object sender, System.EventArgs e)
{
//create instance of source web form
WebForm1 wf1;
//get reference to current handler instance
wf1=(WebForm1)Context.Handler;
Label1.Text=wf1.Name;
Label2.Text=wf1.EMail;
}
Vipin
|
|
|
|