|
Anuradha612 wrote: I have a problem with web pages, each time i run the appln, the pages are loaded from history, which are not updated.
Why is it happening like that? I think there might be some problems with your code...
OR, there might be something wrong with your browser setting?
|
|
|
|
|
Hi,
This is from CHandrakanth.
I have one gridview in that EDIT button is there.
When i click on Edit Button the columnValue(ApplicationName - value) should be displayed in the DropdownList and that should be selected.
the code and all i giving here
protected void gdvRoleDetails_RowCommand(object sender, GridViewCommandEventArgs e)
{
ddlApplications1.SelectedIndex = 0;
GridViewRow row = (GridViewRow)gdvRoleDetails.Rows[Convert.ToInt32(e.CommandArgument)];
if (e.CommandName == "Edit")
{
ListItem item = new ListItem();
item.Text = row.Cells[2].Text;
ddlApplications1.Items.Clear();
hdnRoleId.Value = row.Cells[0].Text;
txtRoleName.Text = row.Cells[1].Text;
hdnAppl.Value = row.Cells[3].Text;
ddlApplications1.SelectedIndex = ddlApplications1.Items.IndexOf(ddlApplications1.Items.FindByText(row.Cells[2].Text ));
}
}
can any one suggest me what to follow for that
Chandrakanth
|
|
|
|
|
i have developed web application using c# with asp.net 2.0. this application will use some person in local machine only. So how can i give that application for production. i mean how to deploy asp.net 2.0 application.
regards,
vidya
Try!!Try!!Try!!......SUCCESS!!!!!!
|
|
|
|
|
You can create installer for your application and deploy the installer executables.
|
|
|
|
|
create a Virtual Directory on IIS and deploy the web sites !!!!
|
|
|
|
|
Hi guys i need ur help in query,
I knew this place is not correct to place abt sqlserver...,
But i need it urgently..,
So plz if any one knows help me,
See i have 2 tables values in that tables look like this:
Table1: *|* Table2:
Key Id name *|* Id M1 M2
1 100 Magesh *|* 100 50 50
2 101 Kumar *|* 101 60 55
Now i want to that "kumar" Id want to 100 and that "Magesh" Id want to 101..,
So i want to update the records using key field...,
While updating the table1 Id and name.., the changes have to update in Table2 records also (Id,m1,m2)...,
How to do that?
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
The best way is to create a trigger on table 1 for insert/update which will update table 2 automatically
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
Can you explain me how to add event handler in asp.net to standard control ?
|
|
|
|
|
keyto wrote: sp.net to standard control ?
What is standard control ?
|
|
|
|
|
I assume that standard controls means the controls that included in .NET framework by default..
It's simple. For example, if you want to add the event handler to button, you can wrote like that .
C#
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);<br />
void myButton_Click(object sender, EventArgs e) {<br />
Response.Write("Button Clicked");<br />
}
|
|
|
|
|
Hii,
Could any one please tell me how to Add Text boxes Dynamically in a ASP page and taking values from those different text boxes into a single column of database table as a different rows.
Also when fetching the value from the database the value should get displayed in their respective text boxes from where it has been inserted to the database.
Help of anyone is greatly appreciated.
Thanks
Imran
Imran
|
|
|
|
|
ImranTech wrote: Could any one please tell me how to Add Text boxes Dynamically in a ASP page
HOW TO: Dynamically Create Controls in ASP.NET by Using Visual C# .NET[^]
ImranTech wrote: taking values from those different text boxes into a single column of database table as a different rows
This is about inserting data into database. If you know about how to insert data into database, you will know how to do it.. just execute two insert statments with transaction.
|
|
|
|
|
Hi,
I'm creating a custom control, which inherits from WebControl,INamingContainer.
I only want to override the property "Enabled" of the base class so that the user of my custom control can disable it. This custom control contains a DropDownList and a ASP:button control.
I plan to set the Enabled property of of both these controls (DropDownList and a ASP:button) to false, when the user sets the Enabled of Custom control to false. Is this the correct approach?
Another query I have is how to hide all other properties of base class except Enabled for my control so that only "Enabled" and few other properties that I specify is displayed in property descriptor.
Regards,
Blumen
|
|
|
|
|
blumenhause wrote: I plan to set the Enabled property of of both these controls (DropDownList and a ASP:button) to false, when the user sets the Enabled of Custom control to false. Is this the correct approach?
Yes it's the correct approach, as the user of the custom control don't know you are using two controls internally.
blumenhause wrote: Another query I have is how to hide all other properties of base class except Enabled for my control so that only "Enabled" and few other properties that I specify is displayed in property descriptor.
AFAIK, this is not going to be possible. You can't hide base class members. But you can use method hiding[^] to write your own functionalities. But all base class methods would be visible.
|
|
|
|
|
N a v a n e e t h wrote: Yes it's the correct approach, as the user of the custom control don't know you are using two controls internally.
these two controls (Dropdownlist and button) are visible to the user in the control.
|
|
|
|
|
blumenhause wrote: are visible to the user in the control.
Okay. But it is a single control right ? So I guess disabling it should disable both controls.
|
|
|
|
|
I tried this code:
public override bool Enabled
{
get
{return base.Enabled;}
set
{
btnClick.Enabled=value;
ddList.Enabled=value;
}
}
But from designer I cannot change Enabled property to false, it stays as True. However, I can set Enabled property to false in aspx page.
|
|
|
|
|
blumenhause wrote: But from designer I cannot change Enabled property to false, it stays as True
Because base.Enabled returns true and in set method you are not making this as disabled. How about the following code ?
public override bool Enabled
{
get
{
return btnClick.Enabled;
}
set
{
btnClick.Enabled=value;
ddList.Enabled=value;
}
} In get you can return any controls enabled value. Because in set method you are changing both control properties.
|
|
|
|
|
I tried this, but the Property "Enabled" is not displayed in PropertyDescriptor. I've tried the code you have provided.
|
|
|
|
|
I have a form which consist of text box. I want to allow to type only numeric value on it by using key press event how can i do this. The Text box is a standard control.
|
|
|
|
|
you have to create a javascript function in that function u have check the isNaN property if true then call this function in onkeypress event
|
|
|
|
|
HI, i am not getting how to put site map path control in webpages.
I created web.sitemap file .
<sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<sitemapnode url="http://w3schools.com" title="w3schools" description="">
<sitemapnode url="http://www.microsoft.com" title="Nicrosoft" description="">
<sitemapnode url="http://www.techgene.com" title="techgene" description="">
<sitemapnode url="http://www.oracle.com" title="oracle" description="">
I added new page to project and just drag the sitemappath in the page
<asp:sitemappath id="SiteMapPath1" runat="server">
From here i am not getting. what to do next?
i want the format as follows
Home >> Test >> page
Thanks in advance
G. Satish
|
|
|
|
|
In sitemap path XML file, you should specify the page URLs.
|
|
|
|
|
I saved an image using file upload control into a database with datatype image by converting it into byte type.How i reteive it as the original image and display it into an asp image control with property ImageUrl.Plz help me by sending some code for it.
|
|
|
|
|
int length = FileUpload1.PostedFile.ContentLength;
byte[] pic = new byte[length];
FileUpload1.PostedFile.InputStream.Read(pic, 0, length);
SqlConnection con = new SqlConnection("connecstr");
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "spa";//stored procedure
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@a", pic);
cmd.Connection = con;
cmd.ExecuteNonQuery();
cmd = new SqlCommand("select * from a", con);
byte[] pic1 = (byte[])cmd.ExecuteScalar();
MemoryStream ms = new MemoryStream();
ms.Write(pic1, 0, pic1.Length);
Bitmap bmp = new Bitmap(pic1);
bmp.Save(Response.OutputStream, ImageFormat.Gif);
con.Close();
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|