But on secondpage.aspx i am not able to access value of session["catagory"] that means it have stored null value automatically. How I will access it....
I have hosted my web forms files and reports files two different IIS instance in same server. When user login i keep username inside session variable. According to that session variable i checking roles each web forms page load event. i share session variable between two difereent IIS instance in same server?
Hey I have a web page and I wish to share a link or tell a friend about this page.So,when I click the share link then the System shall execute AddThis Wigit(fb,twitter,google,myspace...) etc.
What is the C# code that execute this implimention.
I have two urls that are supposed to lead to the same actual folder.
I can't do a redirect because the websites are built so they question the URL and perform accordingly.
So I built two application in the IIS (I tried using a virtual directory for one of them, but I kept crashing on the web.config can not be read). Everything works perfectly except the Application variables which are different between the two addresses. (Specificly I'm counting the number of current users logged on).
I'm Looking for a free(or Open Source) Sharing Script to put it in my content pages(I do ASP.net). I want to allow my visitors to share contents(ex: articles) in social networks like Facebook or on-line bookmark services like google bookmarks.what's the best way to do that? i found JQUERY SHARING(you can see demo here) Plugin from the web. do you know any better choice!?
Probably really easy but in my VB code I would like to say
If webpage = "ErrorPage" then do seomthing End if
So the thinking behind this is that if the ErrorPage is the open page on my site it feeds that into the webpage variable and then that runs the If statement.
Everytime i click a button on my webpage al my variable get erased.I am creating a game page where you can add usernames to a string array but everytime i click a buttom my array gets erased :(
I have developed the below web page which has an asp.net 3.5 listview control as it's frontend and an sql server db as it's backend.
[URL]
The first row on the web page is the inserting row. What I am hoping to achieve is that when the user enters their appropriate data they click the "Next" button to assign this dataset with it's own identity ID (customer_id) value within my database (this works perfectly), at the same time on the fly I want to use this customer_id as a query string variable to populate a child page (customerTrades.aspx) in order to pin further data to this identity. Currently I am attempting to use the below code within the iteminserted event of my listview control but I receive the error: "object reference not set to the instance of an object"??
Is this because the child page cannot find the customer_id variable being passed through the query string? Because it's not actually created yet? Am I using the wrong listview event? How can I achieve what I am looking for?
I must also mention that I'm using a linqdatasource to insert my data on runtime into my database. However, I am using the listview iteminserting event to insert my frontend dropdownlist selected values, code below:
I am showing thumbnail images in dataList on a page of my website. When i click on any image they open in big size. How i will share(Facebook). that particular big size image. My code is given below:
<script type="text/javascript"> var CurrentPage = 1; function GetImageIndex(obj) { while (obj.parentNode.tagName != "TD") obj = obj.parentNode; var td = obj.parentNode;
I have an ASP.NET MVC application that attempts to read a file in using a filestream and File.OpenRead(). When the path to the file is a share on the same workgroup, and I give access to NETWORK SERVICE for the share, this works perfectly as desired.
However, when the path to the share is a UNC path to a remote share within the LAN, with read permissions open for "Everyone", the "File.OpenRead()" method throws an exception saying "Could not find a part of the path".
In my test cases I'm debugging locally with the ASP.NET MVC app being given a UNC path to the computer that it's actually running on. It's a share on my C drive, being "Shared" with permissions to "Everyone" for read access.
Is there something in IIS that needs to be configured? If I try to impersonate, in this context, the impersonation doesn't matter because NETWORK SERVICE was the user trying to access the files when it worked for a share in the same workgroup.
I am working on a financial portal and I am having a problem..I don;t know what to call it so i mentioned it as an 'unknown to me' problem..I have a webpage..whenever I click on any button on my webpage, the request goes through..but nothing show up on the webpage..then If I click on another link and then again come back to previous link,then only I see the results of button_click..
e.g.
I have a currency conversion and investment form..so after filling up the form in following way and if I click on "INVEST" then nothing shows up..
so now if i click on any other link and go back to 'buy currency' link I see the result as 'investment successful'
I got a variable of type System.Drawing.Image and need to convert it to a variable of type byte so I can store the image in the database. Can someone show me how to do that in VB.NET code.
I developed an application form which includes some textboxes for input. When the user click on the button the following tasks has to be done.
1) If page is valid all data should be stored in database
2) A new webform should appear on the same window and the some content of the application form should be displayed in it.
3) When clicking on browser back button it should not post back to previous page.....
I did the first task..and i don't know the code for the remaining tasks. Here is some information
.aspx button control code
[code]....
I opened new webform by using Response.Redirect ("submit.aspx"). Where submit.aspx is the form to be opened after data stored upon the button click in application form.
Nested GridView Control returns "Object variable or With block variable not set" when outer GridView returns rows.
The Nested GridView Control works as long as the outer GridView returns rows, the following code works: [Code]....
Object variable or With block variable not set.
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.NullReferenceException: Object variable or With block variable not set.
Source Error:
Line 118: If e.Row.RowType = DataControlRowType.DataRow Then Line 119: Dim myStatus_ID As SqlDataSource = CType(e.Row.FindControl("sqlDeviceStatusAssign"), SqlDataSource) Line 120: If Not e.Row.DataItem("Status_ID") Is Nothing Then Line 121: myStatus_ID.SelectParameters(0).DefaultValue = e.Row.DataItem("Status_ID") Line 122: End If
I have tried checking for IsDbNull and checking to see if a label exists in a given row. This code *If Not e.Row.DataItem("Status_ID") Is Nothing Then* appears to do nothing.Same with the following:
*Dim localLblItemReference As Label = CType(e.Row.FindControl("lblItemReference"), Label)
To further clarify my question above, I am looking for a method to detect e.Row.DataItem("Status_ID") is nothing/null due to the outer GridView returning 0 results in a query.I have a (Outer) GridView Control with another GridView Control inside of a template field with it's associated SqlDataSource control.
In the "Protected Sub GridViewReport_RowCreated", I provide the Select Parameter for the associated SqlDataSource with the DataItem row value.When the (Outer) GridView Control does not return any rows, the "e.Row.DataItem("Status_ID")" throws a:
Exception Details: System.NullReferenceException: Object variable or With block variable not set.
I am using three listviews on a page ... the first is always populated ... the other two are sometimes populated I want to total amounts and counts from all three ... so I set up steps in the DataBound events works great when all three listviews are populated the error "Object Variable or With block variable not set." occurs when LV2 or LV3 is not populated I've tried testing DataItem ... Is Nothing but get the failure on the If test instead
im about to wirte an app that is an extension from the main application that is hosted on the IIS. My application is going to work as a child app (main app as parent) working in main application pool. User will be redirected from the menu to main app to my website. And here is my problem. I would like to pass informations like user login, login state etc. I cant do it via Query String - that wouldnt be safe. I thought I could pass it via Session state, since the SessionID is the same both sides but I cannot retrives parameters on my website(theyre null).
I have four themes: Theme1, Theme2, Theme3, Theme4. Under every theme, it contains a skin file and css file. In every themes, there are some same css elements, skin elements and different css elements, skin elements. How can I put the same css elements, skin elements under one shared thems instead of every themes.
I have a problem with all multiple tab browsers due to session object. I have a requirement that whenever user opens a new browser I need to show different values, so I thought of using Session as in IE 6 every browser creates a new session. But all other multiple tab browsers IE 8 and FF shares the session(If user has already open the browser and try to open different browser). How can I create new session whenever user opens a new browser window. My application is basically in ASP.NET and server side we have C#.
I am stumped. i want my asp.net website to access a network share folder which is located at say, //hero/superman. I can do it manually.
I've done the following:
1. Included <identity impersonate="true" userName="IUSR_TEST" password="test" /> in my web.config.
2. Set anonymous access in IIS 5.1 with username IUSR_TEST and password: test in the account that is used for anonymous access. Checked integrated windows authentication.
3. Created a profile for IUSR_TEST in computer/management/local users and created the password: test for it. It is a member of guest.
4. Created a user account IUSR_TEST for the network share computer. gave it the same username and password.
4. On the network share computer, I've enabled access for the following people: ASPNET, NETWORK SERVICE, and IUSR_TEST.. all with full potential (for now) for the directory path in question //hero/superman which is really located on: c:herosuperman. I've given it full access.
But when I StreamReader fs = File.OpenText(Server.MapPath(@"\herosuperman est.txt"); I get the error "UnauthorizedAccess Exception". Access to the path \herosuperman est.txt is denied.
So what did I miss, what am I doing wrong. The key thing here are:
the webserver is on a domain. the network share computer is NOT on a domain, it is on it's own workgroup. This workgroup, lets just say is called "villains". So if I have to manually map the network drive to access the files, I must type: /villains/IUSR_Test and password: test to be able to map it on my webserver local computer.
I am getting some memory issues, not entirely sure but does anyone think this could be the issue.On the itemdatabound event the following code runs, and it calls a shared class method Return Image which resizes the original image. Could the coding be the issue for the memory problem. There are about 10 or so items.
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then