|
Subin Alex wrote: regarding the iframe in asp.net2.0;
IFrame is not an ASP.NET control.
Subin Alex wrote: If i upload the project with the above said path,will the iframe be able to access the Default1.aspx page ?
Use the path starts from root directory. Something like /two/Default1.aspx and it can be accessible from anywhere within the site.
|
|
|
|
|
hello - i have three questions concerning impersonation.
(1) Not sure if I like to have password in the clear/web.config to do impersonation in ASP.NET
Example:
<br />
<authentication mode="Forms"><br />
<forms<br />
name="SomeWebApp"<br />
loginUrl="LoginForm.aspx"<br />
protection="All"<br />
timeout="30"<br />
path="/" /><br />
</authentication><br />
<br />
<identity impersonate = "true"<br />
userName = "MyBox\WEBAPPUSER"<br />
password = "pwd"/><br />
<br />
<br />
<authorization><br />
<deny users="?" /><br />
</authorization><br />
(2) Also, how can I grant right (by right click folder properties) to MyBox\WebAppUser so it can write/log to file under:
D:\Inetpub\wwwroot\SomeWebApp
Or should I just grant WRITE permission on the particular log file but then it means I'd have to pre-create the log file. tried couple things I hear perhaps I should grant permission on "Compiled directory" (or "Temporary ASP.NET files directory") of the asp.net app - I found it, it's under:
D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
I then granted permission on the folder - didn't seem to help problem (3) below. (But the dll's aren't in the temp folder)
(3) If I impersonate a non-Admin account, I get errors such as:
<br />
[FileLoadException: Could not load file or assembly 'Castle.Core' or one of its dependencies. Access is denied.]<br />
[FileLoadException: Could not load file or assembly 'Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. Access is denied.]<br />
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0<br />
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43<br />
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127<br />
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142<br />
System.Reflection.Assembly.Load(String assemblyString) +28<br />
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46<br />
These are dll sitting in the web app's bin folder under virtual directory and error goes away if I make impersonated account member of "Administrators", which is undesirable of course. Any suggestion? I tried add one dll in gacutil, that solve the problem for that one dll. Do I need to actually do this for ALL dll's? That's very troublesome. I suspect it has to do with assembly binding ... path probing ...
Thanks
dev
modified on Wednesday, May 13, 2009 11:46 PM
|
|
|
|
|
I've modified the Error.htm page for the application to include an image using the usual IMG tag. It won't display. It's a normal .jpg file, there's a copy in the /images folder, it's been officially added to the project, and the src is given as ~/images/myimage.jpg. It's inside a div with a corresponding CSS style class that specifies the size of the image and the visibility attribute as "visible." What the heck am I doing wrong here?
And while I'm on the subject, why is the Error page the only one in the project that is straight HTML with a .htm extension? Is that done to enable display when the ASP.Net app isn't responding?
[EDIT]
Okay, I've solved the first part. When a page has the extension .htm, references to outside resources are prefixed with .../foldername. When the page is suffixed with .aspx, a tilde will do.
[/EDIT]
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
modified on Wednesday, May 13, 2009 11:41 PM
|
|
|
|
|
Hi all,
I am knowing how to insert datarow into datatable by using method below:
DataTable dt = new DataTable();
DataRow myNewRow;
myNewRow = dt.NewRow();
myNewRow[0] = 1;
myNewRow[1] = "johndoe" ;
dt.Rows.Add(myNewRow);
But in my case, i have upto 20 columns for a row data.Then i don't want to use the For...Loop to declare each column's value. So, may i know its there have any others alternative to insert a empty row into datatable?
Note: Actually at the end, i will bound this datatable to a dropdwonlist.
any helps are welcome
Thanks in advance
regards
cocoonwls
|
|
|
|
|
Hi all,
I got a solution base on my case(in my case i want bind this dt to dropdownlist). In the dropdownlist control, firstly set appenddatabounditems to true, then add a empty items into collection. Then, at .cs just bind the data into that dropdownlist. Off course you have set the datatextfeild and datavaluefeild.
thanks for those view my question~
regards
lswang
|
|
|
|
|
Hi coders,
Currently I am going through a bit complicated problem. It would be great if I get help from you.
The issues is, I have "print this page" button on each page on my site. Where I have called "window.print()". Now my client wants customised footer on that including his logo etc. So now, on that print button, I popup a window and pass the content to another predifed page with footer.
Its working nice if only 1 page print is their, but if content is big and expands to 2 or more pages then my footer is printed on last page only (Obviously). So, I wrote a code for manipulating the Registry Key for "Microsoft\\Internet Explorer\\PageSetup". Code is below:
string strPath = "Software\\Microsoft\\Internet Explorer\\PageSetup";
Microsoft.Win32.RegistryKey oKey = null;
oKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey (strPath, true);
if (oKey != null)
{
oKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strPath, true);
}
else
{
oKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey (strPath, true);
}
string strKey = "footer";
object oValue = "test footer";
oKey.SetValue (strKey, oValue);
strKey = "header";
oValue = "&d";
oKey.SetValue(strKey, oValue);
oKey.Close();
But, I think this will modify Server machine's registry value not client machine's.
Is their any other way to cop-up with this issue??
Any help will be greatful.
Thanks,
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
Anand Desai wrote: But, I think this will modify Server machine's registry value not client machine's.
Correct. The only solution I can see, is to know where the page breaks are, and insert the footer accordingly.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Christian Graus wrote: to know where the page breaks are, and insert the footer accordingly
Ouch!!! That will cause lot of coplexity. Specially if content have images, I have to mind image height and everything. Actually I thought of that before but for the same probelm as I mentioned, I refuse that solution.
I have also thought of one other solution that is to create word/pdf document (on click event of that button) on client machine and put footer on that. but that will look very ugly.(imagine clicking Print button, one document is being downloded on client machine).
Can I access client machine Registry by Javascript? I think thento It will cause permission problem to modify remote machine registry. Am I right?
Thanks for suggession Christian!!
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
HI
We are trying to create web site in IIS dynamically,we are creating website using DirecotyServices.I am created console application
for Creating website,and calling that exe file in the webapplication.It worked in development system.when we deploy in the
server it was not able to create the website.
If i run the exe in the server it was working but creating the website and calling that exe it was not working.
please if any one know about this issue reply me ASAP.
Regards
modified on Friday, May 15, 2009 10:51 AM
|
|
|
|
|
Let's say we have a ListView inside of an update panel. It has paging, sorting enabled and also has selectable rows. I was wondering if there is a way to determine way to determine which event caused the update panel to postback. So lets say selectedIndexChanged event fired, caused an async postback and now i can assign a callback only for when that event returns via Javascript.
I know you can call Sys.WebForms.PageRequestManager.getInstance.add_endRequest(EndHandler) , but I believe that fires regardless of what event triggered the postback.
|
|
|
|
|
It's possible in code behind to get the control id of the async poster, for example:
ScriptManager current = ScriptManager.GetCurrent(this.Page);
if (current.IsInAsyncPostBack) {
if (current.AsyncPostBackSourceElementID == myControl.UniqueID) {
}
}
I'd be surprised if it wasn't available from the Sys.WebForms.PageRequestManager class, or in the event args from the client side.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
Hi,
I have a menu on my web form. Each menu item has 25 subitems. its values are Production, jobTickets, configuration etc. My question is that when I click subitems Production it should show me page1.aspx and when I click on jobTickets it should show me page2.aspx. So how can I pass the values(production, jobTickets, configuration etc) to MenuItemClick method .
|
|
|
|
|
Why dont you use a sitemap and an asp menu or treeview to navigate your site?
Alexei Rodriguez
|
|
|
|
|
Actually I have to show call different funtions based on submenuitems clicked.
|
|
|
|
|
JavaScript Functions??
You can call js function using sitemap
Instead of the url, put a js function call
Alexei Rodriguez
|
|
|
|
|
could u please give me some example i am not good in java script.
Thanks a lot
|
|
|
|
|
Any hints on how to debug this scenario:
I inherited code which uses Jquery hoverIntent to swap images on left nav mouseover.
I open an .aspx page in IE7. The mouseover on the left nav changes the image showing in the center of the screen. Click on menu navigates to appropriate page.
I open the same page in IE7. The mouseover on the left nav changes nothing. Click on menu does nothing.
About 1 time in 15 the mouseover/navigation works.
View source in both situations reveals identical html.
Closest I could find is there is a bug in the jquery hoverIntent plug-in for IE7 on mouseout. The mouseout callback is an empty function.
Everything works fine in FF3
|
|
|
|
|
It turned out to be a race condition type problem.
The masterpage had script includes that performed set up functions in onready.
The aspx page needed to add a class to the body tag in the masterpage, also onready.
FF3 handled it. IE7 didn't.
I took the onready wrapper off the addclass code in the .aspx page and it works (so far)
|
|
|
|
|
Hi to All,
I am Using AutoGenerate Column in GridView.
Can I define the Datatype and Column with for a Column ?
|
|
|
|
|
OF course not. You auto generated them, remember ? You can define a template, but your template gets ADDED, you can't remove the autogenerated columns.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thanks for your Reply. Using template how to do it.
|
|
|
|
|
Just the standard way. Define a templated column and it will be added to the list.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
|
hi
i want to dopdown list like that----when i press ,suppose "a" it will display all item starting with "a----" etc.
thanks in advance
|
|
|
|
|
Try ASP.NET auto completion texbox.
Check this link[^]
|
|
|
|