|
When a web page is open, the system will compile HTML or code behind first?
Best regards,
Chee ken
|
|
|
|
|
Hi,
if you are using ASP.NET and has code behind, it will compile code behind. ASP.NET sends as an response object, all the html elements.
ASP.NET is sever side..............
Sanjeev
|
|
|
|
|
cheeken2u wrote: When a web page is open, the system will compile HTML or code behind first?
Yes.
It will start compiling the aspx file, and as the page directive states that it inherits the code behind class, it has to compile that before it can contine to compile the aspx file.
This is of course in the case that none of them has been compiled beforehand.
---
b { font-weight: normal; }
|
|
|
|
|
I am trying to use a Custom Membership provider. I have set everything up and when i go to run it it keeps giving me the error Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. This a stored procedure in the default table that studio creates for. Any one got any suggestions?
|
|
|
|
|
|
I have a GridView that contains a TextBox and a CustomValidator that checks to make sure the value in the TextBox is unique to that column in the GridView (it's a tiebreaker score - tiebreakers must be unique). The validator works in that it won't let you save a non-unique value to the database (it just returns control to the page without doing anything); the problem is that the error message does not display on the screen, so the user has no idea why their changes didn't save or even *if* their changes saved. Here's my CustomValidator:
<asp:CustomValidator ID="valCustUniqueTieBreaker" runat="server" ControlToValidate="txtTieBreakerScore" ErrorMessage="You must enter a unique Tie-Breaker Score." OnServerValidate="valCustUniqueTieBreaker_ServerValidate" SetFocusOnError="True" ValidateEmptyText="True">*</asp:CustomValidator>
I do have a validation summary, and my other, non-custom, validation messages show up in it just fine. Does anyone have any ideas why this isn't working??
Thanks for your help!! )
~Jen
|
|
|
|
|
hey folks,
i just tryed to start iTunes from an aspx application by the browser. i get the following error:
Die COM-Klassenfactory f?r die Komponente mit CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} konnte aufgrund des folgenden Fehlers nicht abgerufen werden: 80070005.
sorry, it's german but i think you'll get it. if i do exactly the same manually everything work fine.
so i added a line for impersonation in my web.config to run my web as admin:
<identity impersonate="true" userName="admin" password="topSecret"/>
but i still get the same error. i'm afraid i have to configure some DCOM stuff but unfortuneltly i've no idea of DCOM.
if someone is out there who has loaded a COM thing successfully in iis by aspx please help me !!
thanks, bernd
|
|
|
|
|
Hi there,
Do you mean you want to load the COM object at the client side? If so, just make sure that it's properly installed and registered, then your application needs permission to active the object. The identity setting only has meaning at the server side, when your application wants to run under a specific account at the server side.
|
|
|
|
|
Right, i like to instanciate the COM object (in my case iTunes) at the server side. you may think that does not make sense, but it does. is there any security restriction to do stuff like that?
regards, bernd
-- modified at 2:51 Thursday 28th September, 2006
i just noticed the error after changing the inpersonation is 0x80080005. seems to be a CO_E_SERVER_EXEC_FAILURE error, isn't it?
-- modified at 3:43 Thursday 28th September, 2006
in taskmanager i can see iTunes starts under the given user but no ui. i do not need the ui but if i start iTunes throu my code manually (not by iie) the ui will be shown. anyway, after one minute or so i get the 0x80080005 error.
|
|
|
|
|
Actually, I thought that you might have wanted to create the COM object at the client side.
Well, at the server side there are a couple of issues related to the security that you may need to take into account. Here are some for Office Automation, but it still can give you a couple of ideas.
http://support.microsoft.com/kb/257757/[^]
To check that, you can run the dcomcnfg.exe tool, then go to the Itunes application entry and check the security tab.
Another option (normally works in the case of Automation) is that you can create a seperate account, then use this account to logon to install the ITunes application, and finally configure to run the ASP.NET application under this account.
|
|
|
|
|
hey minhpc_bk,
thanks for your advice. you may read one post before my iTunes.exe starts but it does not displays any UI. i set iis process to allow "communication between service and desktop" but that does not change anything.
i checked out iTunes in dcomcnfg.exe and did the following steps:
authentificationlevel: None
launch and activation: <- added the executin user with maximum rights
access: <- added the executin user with maximum rights
configuration: <- added the executin user with maximum rights
And now i get a timeout after one minute. I can see in taskmanager iTunesexe is loaded but not more. The memory usage does dot change...always 23.816MB or 23.820MB but it does not change. Also the CPU usage is zero.
Maybe iis is now allowed to launch iTunes but iTunes is still not allowed to do anything..??
no idea...
|
|
|
|
|
Can you validate in the Task Manager and see if the ITunes runs under the impersonated account or the ASPNET account?
Here, you might want to spawn a new process at the server side and you can use the Process class. However, this class does not pass the impersonated token to the new process, and in this case you'll need to pinvoke CreateProcessAsUser function. For more information, you can see http://support.microsoft.com/default.aspx?scid=kb;EN-US;889251[^]
|
|
|
|
|
the process runs under the impersonated account. it does not matter if i start iTunes by System.Diagnostics.Process or by interop.iTunesLib. The behaviour is the same.
-- modified at 17:43 Thursday 28th September, 2006
Current state: i tryed to start calc.exe with the same result. i can see the process in task manager but no UI.
|
|
|
|
|
It seems to me that setting the "Allow service to interact with desktop" option of the IIS does not help in this case, as it does not have any effect on the ASPNET process and you are spawning ITunes in this process. So IMO you may consider writing a window service which is responsible for creating a new Itunes process, and from the ASP.NET application you can use Remoting (or Web Service) to send the request to the window service to have it start the Itunes.
|
|
|
|
|
I know that to write to the server, the ASP.NET user account needs write permission. But I'm trying to write to the server using regular ASP and need to know to what should I give write permissions?
/\ |_ E X E GG
|
|
|
|
|
Alex,
Normally, it's the IUSR_<IISServerName> (or IWAM_<IISServerName> ), more information can be found from here[^].
|
|
|
|
|
Here is the code from ASP.NET 1.1 that works. My problem is below with 2.0 GridView?
private void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
int playerID = Convert.ToInt32(e.Item.Cells[1].Text);
string sqlDelete = "delete Players where PlayerID = '" + playerID +"'";
SqlConnection conn = new SqlConnection(dsn);
SqlCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = sqlDelete;
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
DataGrid1.EditItemIndex = -1;
BindGrid();
}
This above code is ASP.NET 1.1 code for Deletion from DataGrid. It works fine. Now, I am using GridView (ASP.NET 2.0) The problem I am having is getting the playerID from GridView?
***int playerID = Convert.ToInt32(e.Item.Cells[1].Text); **
does not give any playerID but throws error? How do I get the playerID from GridView. Is the event handler Row Deleting or Row Deleted?
Please help.............
Sanjeev
|
|
|
|
|
I thought you set up the DataItemIndex on the grid to be a unique ID for that row.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Christian,
Thank you for you reply. I am sorry but I did not understand the reply......
The issue is deleting any row from the grid when gridview is shown in the page.
I am trying to programmatically call the delete with code behind.
Thank you,
Sanjeev.
Sanjeev
|
|
|
|
|
A row on a gridview has the property I pointed out, it's purpose is to store a key that you can use to make a database call that identifies that row.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi
i am developing a portal using webparts.
i my design i use only one page(index.aspx) and load its content dynamically as webparts based on querystring.
assume that i have two webparts(webpart1, webpart2) in my application.
when the querystring is http://mysite.com/index.aspx?pageID=1
i should load webpart1 into page and when the querystring is http://mysite.com/index.aspx?pageID=2
i should load webpart2 into page.
when i edit each webpart's properties by switching to editmode of webpartmanager , the changes remain on the webpart until i close the browser and by openning new browser ond going to that page the webpart properties value show their default values not recent values.
what should i do?
|
|
|
|
|
I am building in some ajax functionality on my webpage, but I'm not using any frameworks (nor do I want to).
SO here's what I want to do. I'm trying to make a sort of edit-in-place thing on my site. So if you're signed in you can just click an "Edit" link and then it will show a page w/ a textarea and a save button. I have all this done already.
If I was on the products.html page when I clicked "Edit" I want to pass "products.html" back to the server and have the server send back to me the source of the products.html page - as it is on the server. I want to do this asp.net/C# on the server, can I do this? I want to call a function in a aspx.cs file asynchronously.
SO then, the server will come back with the source of the products page and I will fill the text area with that. Then the user can edit the source and then click the save button. This will send the source back to the aspx.cs method, which will physically save it to the server.
So, how can I call a asp.net method asynchronously with javascript/ajax?
/\ |_ E X E GG
|
|
|
|
|
|
We've developed a web app that uses .net 2.0. My boss wants us to create a flash context-sensitive help system using robohelp X5. I've created some test help files (okay, "some" is not the right word - robohelp created 154 files for this - and only three of those files were actual content pages).
In any case, I put the following line in the master page:
<link rel="text/javascript" href="bin/FlashHelp/RoboHelp_CSH.js" /><br />
and then I put this code in for the help link:
[a class=\"HLinksFont\" href=\"javascript:RH_ShowHelp(0, './bin/FlashHelp/john_test_flash_01.htm', HH_HELP_CONTEXT, 1);\"]HELP [/a]
(I had to replace the pointy brackets with square ones so the oce would display - so much for the code tag, eh?)
Items of note:
1) The indicated js file is in the directory shown above.
2) I didn't misspell anything in the link tag
3) The function I'm claling in the second code snippet exists in the js file I'm linking to.
Result - IE tells me that an object is expected at line/char 1 in default.aspx. What am I doing wrong?
[EDIT]
RESOLUTION
It seems that you can't put files into the bin folder and access them from the web page. When I moved the folder containing the help files into the page root folder (and modified the vraious path specifications in the web page files), everything worked as expected.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
i want some help with exporting detailsview to excell.I m working on a web application and i have a search page and a result page.The result page demonstrates the results of the search in a detailsview and i want to export it to excell.I use a button for that, the code of the button is :
protected void Button1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");
Response.Charset = "";
// If you want the option to open the Excel file without saving then
// comment out the line below
//Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
DetailsView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
/* Confirms that an HtmlForm control is rendered for the specified ASP.NET
server control at run time. */
}
But i have an error message :
"RegisterForEventValidation can only be called during Render();
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: RegisterForEventValidation can only be called during Render();"
Any ideas?????It's very important
Thanks galatia
galatia
|
|
|
|