|
pls find below conversation--
http://www.velocityreviews.com/forums/t67154-webhttpcontextcurrentuseridentityname-is-blank.html
Parwej Ahamad
|
|
|
|
|
If you are using 2.0 you can get the name off of request.loginidentity. Make sure you have nt authentication turned on.
|
|
|
|
|
How can I change the css of my buttons. The css will depend on the type of user, coz some of the buttons are not enable or using other css and some are enabled and using same css. i want to use mybtn.attributes.add( what code will i place here) and what will be aspx code, vb code, and class code etc. im using asp1 and vb.net .
Thanks
Jay
|
|
|
|
|
No need. Ive already solve my problem.
|
|
|
|
|
i have a drodownlist in my form. and i want fill it with some files that there is in my hard how can i do this? i know this code but i dont know how to use it.
System.IO.Directory.GetFiles(Path)
|
|
|
|
|
C#:
string[] files = System.IO.Directory.GetFiles( path );
foreach( string file in files )
{
combo.Items.Add( file );
}
VB:
Dim files As String() = System.IO.Directory.GetFiles( path )
Dim file As String
For Each file in files
combo.Items.Add( file )
Next
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
|
Hi guys,
I need some help regarding windows GDI. I need your help on some errors.
1. webform1.aspx has one button
2. user press the button
3. the pic with the gdi lines will be shown(Ive create a memorystream to store the image)
4. the webform1.aspx button will b gone
Anyway where i can retain the button at webform1.aspx? Is it anyway where i can allocate a space in the webpage to display the form? OR can i use javascript to open a window where i can show the image with the GDI lines?
Tks for helping =)
|
|
|
|
|
Hello,
In have a class inside a compiled DLL where I have the following code:
' Create site map XML document
Dim siteMap As XmlDocument = New XmlDocument
' Load site map XML document from ASP.NET web site map
siteMap.Load(HttpContext.Current.Server.MapPath(Me.SiteMapUrl))
Me.SiteMapUrl is a property.
In my web site I use this class and I set Me.SiteMapUrl = "~/Web.sitemap".
When I run the page I get an error saying:
"System.UnauthorizedAccessException was unhandled by user code
Message="Access to the path 'C:\Documents and Settings\User\My Documents\Visual Studio 2005\WebSites\MyWebSite' is denied."
I went to MyWebSite folder Security and gave Full Control to:
ASP.NET Machine Account (SHAPPER\ASPNET)
and
Internet Guest Account (SHAPPER\IUSR_SHAPPER)
I keep having the same error.
I tried everything I could think off but I was not able to solve this.
Could someone tell me how to solve this?
Thanks,
Miguel
P.S: Here is my full error detail.
"System.UnauthorizedAccessException was unhandled by user code
Message="Access to the path 'C:\Documents and Settings\User\My Documents\Visual Studio 2005\WebSites\MyWebSite' is denied."
Source="mscorlib"
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at By27.Web.UI.Footer.by27f_pSiteMap_Init(Object sender, EventArgs e)
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at By27.Web.UI.Footer.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
|
|
|
|
Give the correct Path of ur file not 'C:\Documents and Settings\User\My Documents\Visual Studio 2005\WebSites\MyWebSite' is denied.". The path of ur file is different from this path. That is ur local path. Give the pathe of ur file where it is situated in web server.
|
|
|
|
|
What?
I am testing this on my computer using VS2005.
To set my path i used: Me.SiteMapUrl = "~/Web.sitemap"
What do you sugest me?
Thanks,
Miguel
|
|
|
|
|
I have retrived values from a database and that are displayed on DropDown List. These values are Integer Type named Position i-e in Database. When I select a new value from dropdown list. I want to swap that value with the old one which was displayed before the selection. What should i do for that in Event handler.
|
|
|
|
|
what do u mean by swap?
Best Regards
3ala2
|
|
|
|
|
how to take the data from sql database into xml page..
and
how to take the data from xml page into sql database..
pls this requierd urgently..
Hello this is Ravi
|
|
|
|
|
|
|
I have a textbox in web application.
It should be accept only numeric values If we are trying to enter other than numeric values the message box should be arraised the error message
like pls enter only numeric values....
Hello this is Ravi
|
|
|
|
|
Use Validation Control with that text box.
Example:
<asp:textbox id="urTextBox" runat="server">
<asp:requiredfieldvalidator controltobevalidate="urTextBox" text="Error">
|
|
|
|
|
You must to use this regular expression on custom validation control
[^0-9]*
keep Learning and you never will be out of date...
|
|
|
|
|
i have a textbox in a form and now i want use it in the other form . how can i do this?
in C#(asp.net)- vs2005
|
|
|
|
|
Do you want use the text wrote at textbox on form1, onto another form?
keep Learning and you never will be out of date...
|
|
|
|
|
i would like also
pls tell me
Parwej Ahamad
|
|
|
|
|
The Rahithi Solution is the best one, but, you know the session vars used Ram Memory.
The another solution is using request and response command, but it only works for one page to the next page, not to all pages (thats the session var solution)
here we go
On page 1
string var_text = TextBox1.Text;
Response.Redirect("page2.aspx?var1=" + var_text, true);
On page 2
On page load or any page 2 process
string txt_box_page1 = Request.QueryString["var1"];
keep Learning and you never will be out of date...
|
|
|
|
|
Thanks,
I know every thing whatever u write.
but server.execute is used to transfer on page control to other page.
but problem is that we can not restrict that no of control transfer on second page.
i can also use server.transfer() all item available in context.item.
but i thought u will give information something different.
thanks again.
Parwej Ahamad
|
|
|
|
|
hi,
take one session variable, and assaign the Textbox.text(text box value) to session variable and read that value in the next pages.
Regards,
Rahi
|
|
|
|