|
priyaram1. Thanks for the info. Your example gave me what I needed!
|
|
|
|
|
Is it a wise idea to use master page in a website. The name mangling problem in master page will affect the JavaScript and CSS style. The designer’s logics will sometimes breaks when the web developer applies master pages.
My question is :
1. how to solve name mangling problem
2. Keeping the JavaScript code as separate .js file (better solution for traffic and maintains)
3. Advantages and disadvantages in using master pages
4. performance
Does every one prefer using master pages? After reading several articles I am still confused on using master pages. Advice me...
|
|
|
|
|
You can replace the control's name in the page load event like this:
abstract string script = "[Label1ID].innerHTML = 'Hello!';";
abstract string scriptKey = "SayHello";
abstract bool addScriptTags = true;
protected void Page_Load(object sender, EventArgs e)
{
script = script.Replace("[Label1ID]", Label1.ClientID);
ClientScript.RegisterStartupScript(this.GetType(), scriptKey, script, addScriptTags);
}
|
|
|
|
|
1) What do you mean? How does it affect CSS and JavaScript?
2) Why can't you?
3) Advantages: Conformity throughout the application.
4) Not an issue
only two letters away from being an asset
|
|
|
|
|
Hi,
1. if we add a text box named as "TextBox1" inside a content page "ContentPlaceHolder1". Then asp.net generate the name "ctl00_ContentPlaceHolder1_TextBox1" on run time. This name mangiling problem will affect the javascripts that written by using the 'TextBox1'. the CSS that applies to a particual named tag (#topImage) will also get effected.
2. if name mangiling happens how can use the below script inside a .js file
var textbox1 = document.getElementById('TextBox1');
3. yes i agree with that. How to seperate programmer and designer logics.
4. i agree with that
|
|
|
|
|
The name mangaling is not a cause of using a master page. Using any container will cause this so as to uniquely identify the control on the page. You just have to understand this process and code accordingly. I have never had a problem with this, in javascript or with dynamic CSS.
only two letters away from being an asset
|
|
|
|
|
I have a details view that a user is editing a txt box called txtComments. When they hit update it is writing those comments to a db. I also want to write those comments to an audit table. So during DetailsView1_ItemUpdating I am having it write to another table. How can I get the contents of txtComments into my db? Is there a dtv.field command or something I can call?
-- modified at 12:04 Wednesday 13th June, 2007
Never mind I figured it out. For others to pull items out of the Details view, set another field as a data key and the following syntax will drop it to a variable:
DetailsView1.DataKey(1)
Where (1) is the key id of the field you are trying to pull. Remember you start off with 0!
BJJONESEY
|
|
|
|
|
hello:
i wanna ask if i can get the installer of the print activeX of crystal report,
iam developing a website using asp.net and installed it on a server. when i tried to access the website from a client PC the report didnt printed. i think its because of the activeX component is missing.
the client is connected through a network with the server and dont have an internet connection
have any idea why the report didnt printed or how to get the activeX installer of the print crystal report. thanx
|
|
|
|
|
I have a template column in a grid view with a button that has the command name set to "Edit". I handle the button click event myself and do not want the grid to fire the RowEditing event. Is there any to turn this default behavior off?
-Mike.
|
|
|
|
|
hi
in the RowEditing Event write
Grid.EditRowIndex = -1;
bye
|
|
|
|
|
Thanks, but not exactly what I'm looking for. I want to stop the event form firing all together.
-Mike.
|
|
|
|
|
I've written a session state provider and tested it in my own app. I now want to set it up to work from within an ASP.Net Application.
My class derives from SessionStateStoreProviderBase and is in an assembly that is referenced from my ASP project and set to CopyLocal true.
I've added this to the web config file inside a sessionState element:
<providers>
<add name="MySqlStateStore"
type="MySQLIntegration,MySqlStateStore"
connectionStringName="ASPSessionState"
writeExceptionsToEventLog="false" />
</providers>
I've tried using a dot or a comma and using the dll name, the namespace, the class name etc in various combinations but I keep getting the following error.
Could not load file or assembly 'MySqlStateStore' or one of its dependencies. The system cannot find the file specified.
Does anyone know what i have to do to the dll or what i have to put in the type attribute in the web.config to get this to work? I've found loads of people asking related questions but not many answers as yet. All the examples i've found on MSDN or elsewhere talk loads about writing the class but seem to think that the web.config just sorts itself out.
Thanks for any help or references anyone can give me
Russell
|
|
|
|
|
Hi All
How can I convert a number to type double in javascript. Pls help. Its urgent.
Thanks in advance.
|
|
|
|
|
Javascript doesnt have the data types.
|
|
|
|
|
I mean, I have a number , I need that number to be display like double.
If number is 34, it should be 34.00.
How is that done.
|
|
|
|
|
|
How acn I read all certificates (using C# code + asp.net 2.0) which are installed in my IE
browser?
Regards
I Love SQL
|
|
|
|
|
can anyone tell me code for below scenario
i populate gridview at pageload.to tht obtained gridview i need to add extra 2 colums one is button n another one is textbox whn i click on button i get popup window in which i enter some value tht value must enter in gridviews textbox.
suppose i have gridview with 5 records 5 buutons n 5 textboxes have to entered
how to get id of those textbosex?????
bye
|
|
|
|
|
Since you are new you should know a few things about the boards:
1. Please read the forum guidelines. Message titles such as 'help' or 'urgent' are often ignored since they give no indication what the problem is.
2. You are asking for code. More people will help you if you at least write some code then ask you questions such as 'why is this giving an error' or 'why does this code not do xyz?' Sometimes by searching the articles (or previous messages) you can find code snippets that are close to what you need.
______________________
stuff + cats = awesome
|
|
|
|
|
How do you add in refernces in VS 2005. In VS 2003 you just right-clicked the references folder and slected which refernces to add and it added it in and you could see it. How do you do same in VS 2005??
Anyone any ideas??
Thanks,
macca
|
|
|
|
|
Website --> Add Reference...
Regards,
Jay
|
|
|
|
|
I did this but I don't know where the reference is. In VS 2003 you could actually see the reference. My code also is still not picking up the reference.
|
|
|
|
|
In VS 2005 also, you have the same method to add references
|
|
|
|
|
Hi everyone,
I am looking at creating a table that lists the number of records based on two columns in a view. Meaning that the two columns refer to an x and a y axis in the table and the cell should be the number of records in the view for that combination.
ie if we had hair colour as an x axis and age as the y axis i would have a layout like this
hair colour ---->
a
g
e
|
|
|
^
then each cell across would display the number of records for each hair colour at a particular age. I need to create it after a user sets a the options and parameters for the table and then clicks generate report. This page is opened up with the correct table. I have all the parameters and everything set up and being retrieved correctly i am just wondering how to display the data? ie what kind of control can i use and what kind of query will i need to populate the data...any help most aprreciateted.
Cheers
Cads
-- modified at 10:03 Wednesday 13th June, 2007
I had a thought just now that maybe I could create this in SQL then just display it in a repeater control but again i don't know if this is possible? if someone can help I would be grateful.
|
|
|
|
|
Hi,
I want to handle the selectedindexchanged event of a checkedListbox in the client side using javascript. I was initially handling it in the server side but it goes to page load so want to handle it in the client side.
How to do it?
Below is my server side code for handling it:
Private Sub cbxEmpResponse_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxEmpResponse.SelectedIndexChanged
Dim ii As Integer
Dim iflag As Integer = 0
Dim ijflag As Integer = 0
If cbxSelectAll.Checked = True Then
For ii = 0 To cbxEmpResponse.Items.Count - 1
If cbxEmpResponse.Items(ii).Selected = False Then
iflag = 1
End If
Next
End If
If iflag = 1 Then
cbxSelectAll.Checked = False
End If
If cbxSelectAll.Checked = False Then
For ii = 0 To cbxEmpResponse.Items.Count - 1
If cbxEmpResponse.Items(ii).Selected = False Then
ijflag = 1
End If
Next
End If
If ijflag = 0 Then
cbxSelectAll.Checked = True
End If
End Sub
Want to convert it in the client side code.
Plz help
Thanks,
Riz
Riz
|
|
|
|