Web Forms :: How To Share Variable From One Webpage To Another

Aug 15, 2013

I have a problem,related to sharing variable between 2 pages.i am using session for it but it does not work,below is my code

firstpage.aspx;
protectedvoid LinkButton7_Click(object sender, EventArgs e){
Session["catagory"] = LinkButton7.Text;
Response.Redirect("secondpage.aspx");
}

secondpage.aspx;
protected
void Page_Load(object sender, EventArgs e) {
Class1.connection();
// string catagory = Convert.ToString( Request.QueryString["catagory"]);// string month1 = Request.QueryString["monthtest"];

[Code] ....

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....

View 1 Replies


Similar Messages:

Web Forms :: Share Session Variable Between Two IIS Instance Of Same Server

Mar 9, 2010

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?

View 1 Replies

How To Share Webpage With Social Network

Mar 29, 2011

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 am using MVC

View 1 Replies

Share Application Variable Between 2 Websites (IIS 7.5)?

Oct 31, 2010

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).

View 2 Replies

Javascript - How To Share Contents Of A Webpage With Social Networks

Aug 29, 2010

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!?

View 2 Replies

Web Forms :: Referencing A Webpage As A Variable?

Mar 17, 2010

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.

View 1 Replies

Web Forms :: How To Include Share Icons And Share Options To Site

Jun 10, 2010

I need a code to have the ability to share my news on social networks.My site structure is in Asp.net and vb.net.

View 1 Replies

Web Forms :: Everytime Click A Button On Webpage Al Variable Get Erased?

Aug 17, 2010

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 :(

View 2 Replies

Forms Data Controls :: Use A Query String Variable Created On The Fly To Populate A Child Webpage?

Feb 22, 2010

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"??

protected void lvTrustAccounts_ItemInserted(object sender,
ListViewInsertedEventArgs e)
{
string customerID = e.Values["customer_id"].ToString();
Response.Redirect("http://www.tradeselector.co.uk/customerTrades.aspx?customer_id="
+ customerID + "");
}

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:

protected void lvTrustAccounts_ItemInserting(object sender,
ListViewInsertEventArgs e)
{
e.Values["customer_created_date"]
= DateTime.Now;
e.Values["customer_update_date"]
= null;
DropDownList ddl_CountyInsert =
(DropDownList)lvTrustAccounts.InsertItem.FindControl("CountyInsertDDL");
DropDownList ddl_CityInsert =
(DropDownList)lvTrustAccounts.InsertItem.FindControl("CityInsertDDL");
DropDownList ddl_CountryInsert =
(DropDownList)lvTrustAccounts.InsertItem.FindControl("CountryInsertDDL");
e.Values["customer_county_code"]
= ddl_CountyInsert.SelectedValue;
e.Values["customer_city_code"]
= ddl_CityInsert.SelectedValue;
e.Values["customer_country_code"]
= ddl_CountryInsert.SelectedValue;
}

View 11 Replies

Social Networking :: Share Images On Facebook Using Share Button

Jun 29, 2013

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;

[CODE]..

View 1 Replies

File.OpenRead() Accesses File On Share Within Workgroup But Not A Remote Share?

Mar 4, 2011

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.

View 2 Replies

Web Forms :: Whenever Click On Any Button On Webpage, The Request Goes Through, But Nothing Show Up On The Webpage?

Dec 17, 2010

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'

View 3 Replies

Web Forms :: Convert System.Drawing.Image Variable To Byte Variable?

Oct 7, 2010

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.

View 2 Replies

Web Forms :: Displaying One Webpage Content In Another Webpage?

Apr 24, 2010

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.

View 9 Replies

Forms Data Controls :: Nested GridView Control Returns "Object Variable Or With Block Variable Not Set" ?

Oct 20, 2010

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)

*If Not localLblItemReference Is Nothing Then

******************************************************************************************

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.

View 3 Replies

Forms Data Controls :: DataBound Event - Error "Object Variable Or With Block Variable Not Set" Occurs When LV2 Or LV3 Is Not Populated

Jan 3, 2011

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

View 3 Replies

Web Forms :: Two Applications - How To Share Data

Sep 22, 2010

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).

View 2 Replies

Web Forms :: How To Share The Same Skin Settings In Different Theme

Jan 9, 2010

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.

View 2 Replies

Web Forms :: How To Share A Page Between Two Master Pages

Mar 19, 2010

I have a master Page A and another master Page B.

I have a couple of pages inside both these master pages.

Now I want a page (freshly created one), to be shared by both of these master pages.

i.e. How do i dynamically say, if the condition is so and so, the master page loaded should be A, else it should be master Page B.

View 1 Replies

Web Forms :: Share Whiteboard With Drawing Tools?

Dec 25, 2010

Am looking for some information with regards to creating a chat page using ASP.NET C# with a facility to share a whiteboard.

View 1 Replies

Web Forms :: Share Session Across Multiple Browsers?

Jul 17, 2015

i am working on add to basket pagei have three browser in my pc when i use chrome browser and Add Prodcut into basket with session .

then how it will show on every browser untill session expire.?

View 1 Replies

Web Forms :: Prevent Session Share Across New Tab Or New Window

Mar 5, 2013

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#.

View 1 Replies

Web Forms :: Share Screen Across Multiple Browsers?

Aug 18, 2015

i have default.aspx page, on that page i am taken two controls linkbutton and iframe. iframe source is sample.aspx.

when i click on linkbutton,

 how can i share my iframe source in new browser. ? 

View 1 Replies

Web Forms :: Can Access Network Share Folder With Impersonating

Sep 29, 2010

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.

View 2 Replies

Forms Data Controls :: How To Share Class With Not Enough Memory

Dec 22, 2010

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
 
Dim ImgProfile As Image
[code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved