|
i cannot find aspnet_regiis
i tried the path C:\WINNT\Microsoft.NET\Framework\v1.1.4322
i had installed IIS version 5.1
what to do
|
|
|
|
|
I built the first few pages of a app and i think it's looking good (the last web app i built was in cold fusion just after IE 4 came out).
As seems to be the standard I've separated my javascript and css from the HTML and it all seemed to be looking nice and clean.
I decided to attach a master page so that i could have consistent menus across pages. I then had to change my javascript to reflect the new names that asp had given all my controls. Shortly after i realised i wanted a master above that because i want the look and feel available for my login screen but the menus shouldn't have loaded at that point. At this point i've realised that i need a more sensible approach then renaming again. All the MS docs suggest that i should emit my JS at runtime to get round this, for all sorts of reasons this is not a path i want to go down. Anything i've dreamt up seems to require my master pages knowing something about the content of their children.
How do other people get round these kinds of problems?
Russell
|
|
|
|
|
Usually, I have the controls I am trying to work with passed into the javascript functions. You just have to pass in the controlname.ClientId. Then inside of the javascript that variable is the object.
So in my code behind I have something like this:
ddlProgramCode.Attributes.Add("onchange", "OnChangeProgramDDL(" + ddlProgramCode.ClientID + "," +
ddlRPLine1.ClientID + "," + ddlRPLine2.ClientID + "," + ddlRPLine3.ClientID + "," + ddlRPLine4.ClientID + "," + ddlRPLine5.ClientID + ");");
Then the javascript function:
function OnChangeReadingProgramDDL(ddlRP, ddl1, ddl2, ddl3, ddl4, ddl5)
{
if (ddlRP.options[ddlRP.selectedIndex].text == "Accelerated Reader")
{
ddl1.selectedIndex = 1;
ddl2.selectedIndex = 2;
ddl3.selectedIndex = 3;
ddl4.selectedIndex = 0;
ddl5.selectedIndex = 0;
}
else if (ddlRP.options[ddlRP.selectedIndex].text == "Reading Counts")
{
ddl1.selectedIndex = 1;
ddl2.selectedIndex = 2;
ddl3.selectedIndex = 3;
ddl4.selectedIndex = 4;
ddl5.selectedIndex = 0;
}
}
Anyway, that is what I have been doing.
Hope that helps.
Ben
|
|
|
|
|
i'd thought of doing that, wasn't sure how well it would work in the long run, especially as i'm trying to keep my code clear of javascript and event attributes.
I've just tried to add a field to the top level master page but even that gets ctl00_ctl00 added to it. Is there anyway of getting a single field into the output that has a guaranteed name so that i can tell my javascript where to find the names of all the controls on the page? So far it seems that all the master page setups i've seen serve to make the code less tidy and bring alot of the script back into the html document.
Russell
|
|
|
|
|
No I don't there is any way of guaranteeing the name since when the html is rendered from the asp.net controls a unique name will be given to it. If you are not using Attribute.Add to add the javascript to your controls, what are you doing? I have found the only way I have been able to get around the whole control namd is to pass the control into my javascript functions.
Masterpages might mess up javascript a bit, but it is much better the the other things I have tried. Usercontrols have their own problem. That was the next best way of doing what a master page does. Honestly I still put some javascript functions in the html of the page that uses it if that is the only page that will use it. The example I gave above was specific to a single page, so I only included it in that page. I figure I don't want to increase my page size by adding it to the master page.
sorry I couldn't be of more help.
Ben
|
|
|
|
|
i had assumed that if i passed the data into a property of the top level master that my control names would be safe but it seems that didn't work but i'm using that as a temporary measure.
I've now got a hidden field on the masterpage that contains some data that my javascript file can pickup and append to the control names.
I've got a setup method inside my js file that registers the events on the controls i need to hook up to. this now reads the prefixes for the names of the controls from the hidden field on the page. I suppose a benefit of the new model is that i can support multiple instances of the same control on the page for less agro. This method was recommended on several sites, all of which claimed attributes were dead. I was shocked to see ASP splattering my code with script tags (and not even in the head).
Thanks for your help, all help is good at the moment, i seem to be picking up ideas from here and there, many oppose each other and i suspect come are more esoteric than practical, problem at the moment is that i don't know what works and what doesn't.
Russell
|
|
|
|
|
Hi,
I have an excel files "c:\test.xls
I want to modify excel tables with asp.net .
I am using this codes but it is not run correctly.
How can i solve this problem?
Thanks.
Dim sConn As String
Dim OleConn As OleDbConnection
Dim OleCmd As OleDbCommand
sConn ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.xls;Extended Properties=""Excel 8.0;HDR=No;"""
OleConn = New OleDbConnection(strConn)
OleConn.Open()
OleCmd = OleConn.CreateCommand()
Olecmd.commandtext="UPDATE [sheet1$F1:A1] SET F1 ='6'"
OleCmd.ExecuteNonQuery()
OleCmd = Nothing
OleConn.Close()
|
|
|
|
|
Hi,
I have a site in which i want that some page will be displayed on http protocol and while some of the pages will displayed on https. how can i do it by using SSL. And above all i want to do it in Asp.net 1.0.
Thanks in advance
Pankaj Tanwar
software developer
smartbuzz solution chandigarh
|
|
|
|
|
i want to redirect http://www.mydomain.com/index.aspx to http://www.mydomain.com
i am trying with the following code in Global.asax.
***************************************************************
if (Request.Url.ToString().Contains("index.aspx"))
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", "http://www.mydomain.com");
Response.End();
}
**********************************************************************
the issue the redirect loop is not ending. Bcoz the requested path for http://www.mydomain.com is also index.aspx.
so the loop is continuing.
any body know the solution for this issue.
Thanking you.
Jes.
|
|
|
|
|
HI,
Better you put "default.aspx" page as a startup page for your domain.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi friends
i have two xml file.
My code is:
XmlDataDocument xdoc = new XmlDataDocument();<br />
XmlTextReader Reader = new XmlTextReader(server.MapPath("xml1.xml"));<br />
xdoc.DataSet.ReadXml(Reader, XmlReadMode.InferSchema);<br />
<br />
XmlTextReader Reader1 = new XmlTextReader(server.MapPath("xml2.xml"));<br />
XmlDataDocument xdoc1 = new XmlDataDocument();<br />
xdoc1.DataSet.ReadXml(Reader1, XmlReadMode.InferSchema);<br />
<br />
<br />
<br />
xdoc.DataSet.Merge(xdoc1.DataSet);<br />
but i am gettig error here.I cant merge.Can Any one give m solution.
Errpr:Cannot add or remove tables from the DataSet once the DataSet is mapped to a loaded XML document..
Thanks In advance
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Hi TO ALL,
When I typed www.codeproject.com in my browser. The Browser open the www.codeproject.com Pages. I want to know what is Background Process from Request to Display the Pages in Browser and At that Process when when CLR executed.
Mohan Balal
|
|
|
|
|
Hi All,
i want to know that, some times website performance is very slow. response time is very high.what are the causes for this.
pls tell me.
|
|
|
|
|
There may be more images loaded in that page.
Regards,
Satips.
|
|
|
|
|
Database issues, concurrency, latency, larger pages being requested. These are just some of the many issues that could be affecting performance.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi All,
I need to sort and freeze GridView, I am using ASP.NET2.0(VB).
Please help me...
Thanks in advance...
|
|
|
|
|
Learning ASP.NET 2.0 wrote: freeze
What do you mean by freeze?
Learning ASP.NET 2.0 wrote: sort
Set SortExpression property of each column in your GridView , Set AllowSorting to true , and also you can user GridView.Sort() method.
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
Thanks for the reply. Freeze means fixing heading row of Gridview.
I need freeze and sorting both.
Thanks again...Please help...
|
|
|
|
|
If you mean fixing Size, you have to set the size in HeaderStyle .
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
No I mean it behaves like an Excel freeze pane. It fixes the heading and only item scrolls.
Please help...
Thanks...
|
|
|
|
|
Hi all! Can anybody tell me, how I can jupm to other page of my ASP.NET project. I try something like this System.Diagnostics.Process.Start( <page_name> ); , but nothing happened.
|
|
|
|
|
Hi,
Why dont you use Response.Redirect or Server.Transfer?
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
thank you ever so much, it's work.
|
|
|
|
|
System.Diagnostics.Process.Start( <page_name> );,
This one start a new process at server and it depends on WinForm Application or Console Application.Use Response.Redirect();P
|
|
|
|
|
hi friends
on aspx form i have one server button ( Save ) and one HTML button (Canel)
On Save button values of text box store in database
on Cancel button I Just invisble one panel
both buttons are working fine
when i press save button and
when values of text box already exist in table
it gives me an Sql Error 2627
i shown error desc in label
now i want to cancel it means invisible panel
but it doesn't work here
how can i make it invisible in such condition
thanks
|
|
|
|