|
Thank you for quick reply,
Please let me know in my
.ascx page
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="My_test.ascx.cs" Inherits="MyControl" %>
.ascx.cs page
public bool checkValues()
{
...
}
How to call it in my Test.aspx.cs page
I have placed
protected System.Web.UI.UserControl My_test; am i doing any thing wrong here in my aspx.cs page
But I can't call the checkValues() in Test.aspx
plz let me know
|
|
|
|
|
You have created an Object(User Control) with name My_Test. This is not what I exactly described. you create an instance of that user control you added to the aspx page.
How do we access a function written in a class. we create an instance of that class and call the function with the instance. the user control you created is also a class inherits the base calss UserControl.
ok... there will be a ID for the usercontrol placed in the aspx page right.. and you application will have a NameSpace right...
say for an example ID is "Ucl1" and NameSpace of your Application is "TestApp"
then the statement...
protected TestApp.My_test Ucl1;
Ucl1.checkValues()
Regards John
|
|
|
|
|
Thank U very much, we did not use NameSpaces in our test application. We thought by placing some thing like this we can access it.
protected System.Web.UI.UserControl CaptchaControl;
Now we will place namespaces and test it.
Is there No other way we can access user control functions with out using namespace.?
Thank U.
Regards,
Vijay
|
|
|
|
|
hi
i open a window in one of my web forms with follow java script code
window.open(...);
and now want to when user close second page ,notify to first form .
how can i do this ?
tanks
|
|
|
|
|
m using LoginName control inside LoginView control to get user name dat is sign in .now i wanna get the values of LaginName for sql databse connectivity.plz help
recards
Ahmad
|
|
|
|
|
Hi friends,
my application needs to handle all the events of browser closure. The differents events are
1) close the browser using the "X" button
2)Close the browser window using ALT+F4 key
3)Close the window when its in fully minimised state and using the close option from the pop up window that comes when right clicked using mouse.
in all the above condition i want to fire my c# code.
then how can i handle this situation
actual problem is that i want to call the logout page at browse close
plz help me some
-- modified at 5:11 Saturday 25th August, 2007
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|
|
you can't call the logout page on the close button click. but you can prompt a message to stay on the current page. To do this call a javascript function on the onbeforeunload event..
try something like this...
<script language="javascript"><br />
function CaptureClose(){<br />
return false;<br />
}<br />
</script><br />
<br />
<body onbeforeunload="return CaptureClose();">
Regards John
|
|
|
|
|
very very thanks for reply
but i have to save the logout time in database then how can i do it?
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|
|
when the user closes the browser window, actually he is not logging out. his session remain's active until the session timeout is reached. If you want to save the logout time, you can do when the session ends.
Regards John
|
|
|
|
|
thanks again
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|
|
my codes to save for my data goes like this:
Dim ctr As Integer<br />
Dim dr As DataRow<br />
<br />
dr = DataSet71.students.NewRow<br />
dr("studname") = txtname.Text<br />
dr("year") = txtcourse.Text<br />
dr("course") = txtyear.Text<br />
DataSet71.students.Rows.Add(dr)<br />
OleDbDataAdapter1.Update(DataSet71)<br />
MessageBox.Show("Record Save!")
but there's an error in this part: OleDbDataAdapter1.Update(DataSet71)
i already use this codes in my previous projects ant it function well...
but now, i cannot already save my reord. whats wrong with my codes???
|
|
|
|
|
Use OleDbCommandBuilder along with the Adapter.
I think, there is no primary key constraint.
|
|
|
|
|
i dont know how to use oledbcommandbuilder...
i have a primary key in my database, my primary key there is the studname...
|
|
|
|
|
I am using Ajax in my ASP.NET application..
Placed a Tabcontainer and within it an Accordion and inside the accordion pane
a GridView and textboxes..
when i am trying to bind data to it at PageLoad is shows errors.....
Please help me
i am new to Ajax
Thanks in advance
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Good...
Give your network information, so that I can check whats the error is. :->
|
|
|
|
|
How to access a method declared in a module in asp.net 2.0?
|
|
|
|
|
There is no module rather you create class library ie is called as class assemblie. Now this has to be in some namespace. You will require to first reference this assemblie into your project and later in your code C# use the using statement eg using xyz.abc;
Regards
|
|
|
|
|
Hello Everyone,
Can anybody let me know wht's a difference between simple mail and Newsletter
and How is it(Newsletter) designed in HTML or ASP.NET
..............
|
|
|
|
|
Wow - I'm not sure how to answer this and not be condescending.
A newletter is a simple email, the mail format has no way of setting that a mail is a newsletter. The obvious difference is that a newsletter is sent out typically to more people than an email.
The Knowledge wrote: and How is it(Newsletter) designed in HTML or ASP.NET
I recommend that before you continue with your given task, you let whoever is asking you to do it, know that you have no idea what you're doing, and ask for some references/guidance. You're way too lost to get by just on help from strangers online.
HTML is incapable of sending emails. ASP.NET trivially sends emails, newsletters or otherwise.
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 )
|
|
|
|
|
Hey Chris,
I have a question in the above response.
Christian Graus wrote: ASP.NET trivially sends emails, newsletters or otherwise
If ASP.NET is not worthly, which mode you suggest to choose?
I have developed some Web Applications which normally mails every action to a set a users (depends on the group). I like to know some more ideas to improvise myself.
|
|
|
|
|
Venkatesh Mookkan wrote: If ASP.NET is not worthly, which mode you suggest to choose?
Trivial means without much effort. ASP.NET contains classes that make it really easy to send emails.
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 )
|
|
|
|
|
When I deploy my web application from file system to web application I get The remote name could not be resolved: <service name="">.
The web service request works perfectly fine when I execute the web application from file system, as soon as copy the web application to web site at IIS and launch I get Webexception. Can any one tell me the solution to get away with this.
I am using ASP.NET 2.0 with C# 2.0.
|
|
|
|
|
Where are you deploying it to, and how do you reference it ? It sounds like a DNS error....
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 )
|
|
|
|
|
I have deployed it on IIS 7.0 and then call the web service web methods which is in web reference. So please tell me how to resolve this issue.
|
|
|
|
|
You didn't really answer me. If the error is that a name cannot be resolved, I am assuming you reference the web service by a URL, which cannot be resolved, or something like that.
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 )
|
|
|
|