|
Good Question but when you post in CP use the < pre > tags to format your code, i would like to help , but i loose interest because your code is not formated well
int i=0;
try to format it
and we will answer
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
iam having two user controls u1 and u2 .i have one public method in u1 .now i want to call this method in u2.how can i handle this one .
|
|
|
|
|
Remember i order to do that in U2 you must register the U1 and after that you can access your u1 method in U2 like this
u1.Mymethod();
Hope this Helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
this is not working ...is any other way to do that one
|
|
|
|
|
What is it that is not working ? Tell me what you did because that is how its done.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
hi Maseko,
actually in my application there are neary 25 webpages which are using two user controls tat are banner and navgation user control..but in each page the ids of these two controls are different and they have used according to the pagenames..now there is a situation that the method of one user control u1 is required to used in the u2 when a button in the u2 is clicked..
|
|
|
|
|
Good Morning lakshmichawala
I will show you an Example of how you do it. i will create a Small Example.
First i will create a usercontrol and name i U1 like and it will have a method that will display a string like this
cs will look like this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class U1 : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public String Message()
{
return "Message from U1 User control";
}
}
and the html will be like this
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="U1.ascx.cs" Inherits="U1" %>
<asp:Label ID="lblU1" runat="server" Text="Usercontrol 1"></asp:Label>
and second thing is to create a Second user control and name it U2
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="U2.ascx.cs" Inherits="U2" %>
<%@ Register src="U1.ascx" tagname="U1" tagprefix="uc1" %>
<asp:Label ID="lblU2" runat="server" Text="User Control 2"></asp:Label>
<p>
</p>
<p>
</p>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
as you can see i have registered the U1 and in my U2 i can use the Function that i have made public like this in the button click
protected void Button1_Click(object sender, EventArgs e)
{
U1 obj = new U1();
String Message;
Message = obj.Message();
Response.Write(Message);
}
and a hardcoded message will come from the U1.
Hope this helps
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
If you're trying to interact between two already loaded instances of different user controls I would possibly use an event. For example, when u2 button is clicked raise an event to the calling page, the calling page can then call the method in u2 as it already knows about it.
Alternatively, you can create a property on u2 of type u1 and the consuming page could set the property on u2 to the instance of u1 on the page, u2 will then have access to u1 and its methods.
|
|
|
|
|
Hi,
Please help me i am new to .Net... if any one knows how to get back up data from database using c# and asp .net.. please mail me one example to
suhachi@rediffmail.com
Thanks,
|
|
|
|
|
|
hey i am not getting it ... don't give that ready made answers...
i need something very simple
|
|
|
|
|
Read the article that he sent you the link to.
|
|
|
|
|
I have table like that:
wel here is Event
void grid_RowCreated(object sender, GridViewRowEventArgs e) {
if (e.Row.DataItem == null) {
return;
}
LinkButton cmdCity = (LinkButton)e.Row.FindControl("cmdCity");
if (cmdCity != null) {
int id = (int)grid.DataKeys[e.Row.RowIndex].Value;
cmdCity.CommandArgument = id.ToString();
}
}
and this event retrieves from data only one field concrete ID
I want to retriwe another ID's to like countryid, regionid or etc.
How do that??
C# Developer
|
|
|
|
|
It isn't very clear to me what you are asking?
only two letters away from being an asset
|
|
|
|
|
The obvious way is to create a string datakey which is an amalgamation of ids. There's only one data key value, so it needs to contain the values you want, or give you what you need to look them up
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have not written whole code but
when This Event will rise, corresponding row from data binds to e.Row.DataItem
and this line
int id = (int)grid.DataKeys[e.Row.RowIndex].Value;
retrieves only one field from data and it's PK ID.
I want to retrieve aother values too.
there is grid.DataKeys[e.Row.RowIndex].Values too, but i didn't understand ho do it.
C# Developer
|
|
|
|
|
Hello Everyone,
I want some of my website pages secure (SSL enabled) because I need to transmit sensitive information.
I read some of the articles on WEB, but none of them seems to give me accurate and step by step instructions on doing it.
Please help me out regarding this.
Thank you.
|
|
|
|
|
For this you need a certificate that must be installed on IIS.Even you generate the certificate request from IIS also and get the certificate from.For detail step see the Link
|
|
|
|
|
chintanstrings wrote: but none of them seems to give me accurate and step by step instructions on doing it.
Step By Step Guide For SSL
Hope this will help you !
|
|
|
|
|
|
You are welcome
|
|
|
|
|
I have created a very powerful web-based software as part of my thesis. Though, nobody helped me in my project, yet I have to submit my software with full source code. Some of the features of my software are unique & even not available in SAS or SPSS. However, some of the scientists at my Instt. will publish & commercialize it without mentioning my name anywhere and all my effort will so far, would become futile.
Is there, any way that I can make the source code uneditable or encrypted, so that nobody can edit it except me. Or is there any way that I put my name in the source code such that nobody will be able to remove afterwards.
Please help
|
|
|
|
|
I beleive you have developed your project is layer architecture manner like BLL, DAL and UI . and for BLL and DAL you haev your own dlls. So try to obsfucate the dll using some tool and Before giving the site, give the published version of your site, DO NOT give the website by just as copy paste. Give the Published Version.
And have a look around the google, you will also find some alternative solution.
|
|
|
|
|
Abhijit Jana wrote: So try to obsfucate the dll using some tool and Before giving the site
Do you really need that?[^]
|
|
|
|
|
No Software Is Truly Safe
By the way navaneeth, Here is my latest one. Have a look
|
|
|
|