C# - Paging In Gridview In Webform


i am paging my grid view datas. now am on 3rd page of gridview. in 3rd page i have list of buttons in each rows. when i click on one button it goes to another webpage. where i edit datas and save. when i click on save it comes back to page having grid..which loads from 1st page of grid...i want to load the 3rd page of gridview itself.

View Answers
Very similar questions
C# - Copying The Entire Telerik Docklayout From One Page To Another Page stackoverflow.com

I'm trying to copy the docklayout from one page and try to recreate it in another page. Here is my code- protected void dockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e) { List dockState = dockLayout.GetRegisteredDocksState(); JavaScriptSerializer ser = new JavaScriptSerializer(); Session["dock"] = ser.Serialize(dockState); } protected void btnSave_Click(object sender, EventArgs e) { Response.Redirect("receivingPage.aspx"); } receivingPage.aspx.cs public partial class receivingPage : System.Web.UI.Page { private List dockStates; private RadDockLayout dockLayout; protected override void OnInit(EventArgs e) { dockLayout = new RadDockLayout(); dockLayout.LoadDockLayout += new DockLayoutEventHandler(dockLayout_LoadDockLayout); JavaScriptSerializer ser = new JavaScriptSerializer(); dockStates = ser.Deserialize>(Page.Session["dock"].ToString()); for (int i = 0; i < dockStates.Count; i++) { RadDock dock = new RadDock(); dock.ID = string.Format("RadDock{0}", i); dock.ApplyState(dockStates[i]); dockLayout.Controls.Add(dock); } this.Controls.Add(dockLayout); } protected void Page_Load(object sender, EventArgs e) { } void dockLayout_LoadDockLayout(object sender, DockLayoutEventArgs e) { foreach (DockState state in dockStates) { e.Positions[state.UniqueName] = state.DockZoneID; e.Indices[state.UniqueName] = state.Index; } } } But I'm getting emtpy docklayout in receivingPage.aspx.

C# - Angle Brackets In Page Head Element? stackoverflow.com

PHP experience (which meaby is causing this problem) and Iam having small problem passing data from codebehind to view-source. I declared string variable on codebehind side such as: ... public string mystring = "Scotty"; protected void Page_Load(object sender, EventArgs e) { ... So now I want to use it in view-code but when I put it in angle brackets (<%: or <%=) and put it in head element I got no access to this value. On the other hand when I put it in BODY element everything is ok. My failing example (simplified): <head runat="server"> <script language="javascript"> function beamMeUp() { alert(<%=mystring;%>); } </script> </head> <body> <input type="button" onclick="javascript:beamMeUp" value="Warp6" /> </body> why I can't use it (the <%=mystring;%>) in HEAD but i can use it in BODY ?

C# - .Net Equivalent Of JSP Page? stackoverflow.com

What is the .Net equivalent of a JSP page?

C# - Google Page Rank Checking Script? stackoverflow.com

I am in search of some Asp.Net script by which i can get the google pagerank of any url that i supply to it.

C# - How To Pass Data To A Custom Error Page stackoverflow.com

How can I pass some data from a Global.asax event handler to a custom error page in ASP.NET without using Server.Transfer or some redirect?

C# - Find Control On Page By Id? stackoverflow.com

Is there a simple way to find a control in ASP.NET by id (in any nested container)? Other than traversing whole controls tree. Something like this example: TextBox tb = new TextBox() { ID = "textboxId"}; panel3.Controls.Add(tb); And in other method/class: TextBox nameTextbox = MethodToFindControl("textboxId") as TextBox;

Web Forms :: How To Link .cs(class File) With .aspx.cs File forums.asp.net

i have created basic .aspx files .one is login.aspx and registration.aspx...Now in my solution explorer i also added class file i.e StudentInfo.cs and wrote some properties in it...now my question is 1. i want to connect Studentinfo.cs class to my login.aspx.cs...So that i can call the methods in Studentinfo.cs..how to do it?

MVC :: How To Display Portion Of Page Within Another Page forums.asp.net

I want to have two pages/views(?) A and B. When a user sees page A, I want to display a section of the B page inside the A page. When the user sees page B, he should see the regular B page. How can I accomplish this?

Web Forms :: Page.IsPostback Versus Page.IsCallback forums.asp.net

what the difference is. When will you use each? What Is the good use of IsPostback? Is this for to not loading data from database if Postback occurs to save on performance? It seems to be working for me, I only load data if not IsPostback. Is this correct? Is this because all my postbacks are generated by UpdatePanel? What is a difference between Postback generated by UpdatePanel versus regular Postback? Is the IsCallback true in this case? Should I check it instead? 

Calling Page Methods Of UserControl / Page Using MSAJax? stackoverflow.com

Is it possible to call usercontrol methods/events using MSAJAX. I wanted to update my usercontrol by calling one of its events when a property from its parent page changes.

SQL Reporting :: Carry Forward Total Of A Page To Next Page forums.asp.net

i am on a report in which i need to show the Total of Current Page in page footer then i want to carry forward this total to Next page's Page Header. How can i do it?

Web Forms :: Transfer Data From Gridview Row In Framed Aspx Page To The Other Page forums.asp.net

I am not sure if this is possible (I am quite new at asp.net stuff but quite experience in VB ) I have managed to do the following, with no problems: I have a framed page, top page has a gridview and seach fields to query an Access database. Each record has 40+ fields The bottom framed page, has some textboxes. Once you do a search on top page (gridview), you are able to select whatever row it is shown. At this stage (when record is selected on top page) using "select" or whatever, I would like to transfer the data from the selected row and put them on the many textboxes on the bottom framed page. I know there are better ways to do this, however on the bottom page, users are able to ammend, add etc additional values, as well as doing some calculations, prior to transfering the info to (yet again) another form, so needs to do it this way as per request from my boss.

C# - Parse JSON String Into DataSet? stackoverflow.com

I have to the replication.That time have to pass String as JSON {"Table1" : [ {"Name" : "MyCustomer","Description" : "cutomer","Status" : "1"}, {"Name" : "Kiraa","Description" : "My","Status" : "1",}[code]...... This is my format of JSON result. I want to convert to DataSet.I have installed JSON.NET library. I am using C#.net public bool convertJSONToDataSet(string strBusinessUnit, string strExecutiveCode, string strTableName, String jsonContent) { DataSet dataset = JsonConvert.DeserializeObject<String>(jsonContent);[code]..... here this statement is wrong DataSet dataset = JsonConvert.DeserializeObject<String>(jsonContent); how to covert to a JSON string to a Dataset.

C# - Using JSON In .Net? stackoverflow.com

What libraries are available to handle JSON in .Net? I've seen this: [URL]..but would prefer a native library, if possible.

C# - Turning HTML Div Code Into A Control? stackoverflow.com

I have bunch of HTML code I am using to make rounded edge boxes on my controls. Is there a way to take this code and turn it into some kind of control or something so I do not have to keep pasting 10 lines of HTML code around everything I do? <div id="BottomBody"> <div class="box1024" > <div class="content1024">[code].... One additional thing to note, the number HTML tags used inside the inner most DIV will change depending on where I use it in my site. So in some cases I will only have 1 tag and 1 tag but in other cases I could have 1 tag, 1 tag, 3 tags, and a HTML table. How can I make that work?

Want To Create Html Link Using C# - Dynamically. forums.asp.net

I have a link in my site like this. <a href=""><fontstyle="font-size:small;font-family:Arial;"id="mylink">Please Click here to see Details.</font></a> I want to create this link dynamically (In the button click) using C#.I am looking for a normal html control. I am not using linkbutton.

C# - How To Insert Image In Html Action Link stackoverflow.com

I have navigation and many link on my webproject from html action links. They are ugly with underline. I would like to insert some image with name or play with styles of action link.Is it possible? How to do that?

C# - Bind Event To Generated Html Link? stackoverflow.com

I generate in a foreach loop html links ("test which I add to a pre defined literal.ow can I add a void to the generated html link? I tried with runat server and onclick.. but does not work..Goal is to add by the onclick a pre defined void from a API.

C# - Extract Images Link From Html Text String? stackoverflow.com

I want to extract all images link to so I can utilize all images freely. how to do in asp.net c# <div> <img src="/upload/Tom_Cruise-242x300.jpg" alt="Tom_Cruise-242x300.jpg" align="left" border="0" height="300" width="242"> sample text sample text sample text sample text <img src="http://www.sharicons.com/images/rss_icon.jpg" alt="Icon" align="left" border="0" height="100" width="100"> sample text sample text sample text sample text sample text sample text sample text sample text</div>

How Do I Link Layers Together In CS 2 www.photoshopgurus.com

How do i link layers together in CS 2 Can't find the little boxes i used to use in ver 7

C# - Parse Using Regex Class Of System.Text.RegularExpressions stackoverflow.com

I have a string which i need to parse using Regex class of System.Text.RegularExpressions. I need to find if the first 2 characters of the string are either "00" or "07" or "16" or "23".

C# - Parse CSS Out From <style> Elements? stackoverflow.com

tell me an efficient method of retrieving the CSS between tags on a page of markup in .NET?I've come up with a method which uses recursion, Split() and CompareTo() but is really long-winded, and I feel sure that there must be a far shorter (and more clever) method of doing the same.it is possible to have more than one element on a page, and that the element can be either or .

C# - XML Serialization In .NET? stackoverflow.com

I have xml like this: <?xml version="1.0" encoding="utf-8"?> <session xmlns="http://winscp.net/schema/session/1.0" name="blah@blah.com" start="2011-10-03T15:09:30.481Z"> <ls> [code].... Why is XMLSession.FileList.Count always 0. I hypothesize it has something to do with the declaration above it but I am not sure what is wrong with it. Maybe it can't accept a path, if not, how can I do it?

C# - .Net XML Serialization Based On A XSD? stackoverflow.com

I've been serialising and deserialising .net objects using the XmlSerializer class without problem, however we now need somebody else to look at that data to perform some analysis on it.In order to help with that we've produced an XSD based on our class like so: xsd.exe /t:DataClass Assembly.exe The start of the XSD looks like this: <?xml version="1.0" encoding="utf-8"?> <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="DataClass" nillable="true" type="DataClass" />[code]..... Bizarly, the XML produced does not adhere to the XSD generated from the same class.My question then is, is there a way of telling the XmlSerializer to serialize the object based on a given XSD? As an aside, I've looked at other ways of fixing this: I've tried re-generating the classes from the generated XSD - this seemed to have the same problem.

C# - Serialization Across Projects With Inheritance? stackoverflow.com

I have a base class ("MyBaseClass") in a project called "BaseFramework" which is included in several solutions within the company. There are several derived class's in various projects throughout the company that inherit from "MyBaseClass". If I then create a List and add derived class's to it, it will not serialize. I realise that if I were attempting to serialize this list, and the base class and derived class were in the same project, I could simply apply the "XmlInclude" attribute to the base class and include all of the derived class's. This is however not possible across projects, because that would require a circular dependency.

C# - XML Serialization Assembly For Non-web Projects stackoverflow.com

I am attempting to solve the well known problem of automatically generated serialization assemblies in VS 2010, both VB.NET and C#. The "Generate Serialization Assemblies" option in project settings does nothing for non-web projects (see [URL]). Thus the calls to serializers generate file i/o exceptions that are very unfortunate, and for which there is no cure. The method suggested above does not appear to work with VS2010 and SGEN still runs with /proxytypes enabled.

C# - How To Serialize Only Some Properties In .Net stackoverflow.com

This is for a web project so i have several classes that inherit from Web.UI. I only want to serialize very particular properties (basically, only local properties) I'm aware of the XMLIgnore property that can be placed on a property to ignore items, but this won't work in my context since that would require modifying a bunch of stuff that i really don't want to modify (and probably can't). So how do i tell the xml serializer to ignore everything except for X and Y or tell it to seralize just X and Y? i could just create my own xml in a string builder or something and if that's the only way, so be it. however i'm looking for a method that will employ the built in XML stuff.

C# - Import MD5 Passwords From A PHP App? stackoverflow.com

So I'm in the process of writing an ASP.NET application that requires to import users from a PHP application. The passwords were hashed using MD5 into the database, so the user table records looks more or less like this: user Password user1 827ccb0eea8a706c4c34a16891f84e7b user2 e10adc3949ba59abbe56e057f20f883e And so on. I have access to the PHP source code and I can see that there is no salt or anything else, it is juts a straight MD5 application. Now, Back on my ASP.NET, I tried to use MD5 using the following logic: [Code].... Problem is, that is returning strings like 50-F8-4D-AF-3A-6D-FD-6A-9F-20-C9-F8-EF-42-89-42, which of course is not going to match with the information in the database. What should I do so I don't have to reset 500+ user passwords?

C# - How To Open A Link In A New Window stackoverflow.com

I have a button which redirects the user to another page. Instead, I would like this button to open a new window that points to this location. aspx: <asp:ImageButton ID="img_url" CommandName='<%#Eval("url") %>' OnClick="img_url_Click" runat="server" ImageUrl="~/images/products_details.png" /> cs: protected void img_url_Click(object sender, ImageClickEventArgs e) { ImageButton img = sender as ImageButton; Response.Redirect(img.CommandName.ToString()); }

C# - Open Link In A Different Panel? stackoverflow.com

I have a page that dynamically generated a list of links to a web page (aspx) that opens an image. I do not have direct access to the PDF, only through the ASPX. The code behind is C#. So if I have a page that has codes that looks like this [code]... How do I open the view.aspx link in the cell labels 'Open Image Here'?

C# - How To Open The Download Window When A Dynamically Created Link Is Clicked stackoverflow.com

i have stored the txtfile in the database.i need to show the txtfile when i clik the link. and this link has to be created dynamically. my code below: aspx code: [code].... i have got the link dynamically, but i did not able to download the txtfile when i clik the link. how to carry out this.

Web Forms :: How To Download The Saved Word Document From Ms Access Database Using C# forums.asp.net

In my application, getting the word document from users and i saved that doucment in access database. Data type is OLE Object. I want to know how to retrieve the document from db?

C# - How To Create Simple Stacked/segmented Html Bar stackoverflow.com

Rather than try to reinvent the wheel, how to create a stacked/segmented bar or point me to an existing control. Here's what I need: Horizontal bar Standard html Each segment needs to be color coded from css Each segment needs to be a percentage of the total (i.e. if total value = 100, then a value of 10 for one of the segments would be smaller than a value of 50) Should be able to fit seamlessly into an html table cell Should not be an image Should only create a single bar with segments (not multiple bars/segmented bars) Server-side generated, no AJAX This should be as simple as possible given x number of values, create x segments. I'm looking for code examples or already-built controls. EDIT: For completeness: int[] segments = { 10, 5, 45, 20, 20 }; Panel horizontalBar = new Panel(); for(int segmentIndex = 0; segmentIndex < segments.Length; ++ segmentIndex) { horizontalBar.Controls.Add(new Panel() { ID = String.Format("segment-{0}", segmentIndex), Width = Unit.Percentage(segments[segmentIndex]), CssClass = "segment" }); } this.Page.Form.Controls.Add(horizontalBar);

C# - Get The Full Path From A Fileupload? stackoverflow.com

When I'm using the file upload control I just get only the file name, but I want to get the full path of the file location. How do I get the full path from the file upload control in ASP.NET?

C# - How To Get Full Path Of Downloaded File stackoverflow.com

i want to find the downloaded files full path. in my case. iam replacing some data in document and saving in client side. so itz automaticaly saving in thw client side(normally in the Temp folder). i want to get that full path from the client side. code Response.AppendHeader("Content-disposition", "attachment; filename=myword.docx");

How To Return The Full File Path In A C# Web Application stackoverflow.com

I have a VS 2008 web application that I need to capture the full file path (directories and file name) from the selected file. So user selects a file and then clicks on one of the buttons which transfers control to my code for processing. So how do I get the file path? I can get the file name, but not the path.

How To Control On HTML Elements By Using C# Code forums.asp.net

How can I control on HTML elements by using C# code in asp.net pages. For example: I want to change the content of span tag or td tag when load page... that's mean write code c# in Default.aspx.cs for example to change Span content

C# Sample Code Library Of Comon Tasks / Boiler Plate Code stackoverflow.com

anyone use/ know of any library or website with code snippets or samples with many of the mundane boilerplate code and/ or functions like data access, data scrubbing, recursive routines... preferably c# since most of .net in the real world is c#. VB is ok too.

Call SQL Function With Multiple Parameters From C# Web Page? stackoverflow.com

I have an MS SQL function that is called with the following syntax: SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE ClientID = 7 AND LocationName = ''Default'' ', 10) The first parameter passes a specific WHERE clause that is used by the function for one of the internal queries. When I call this function in the front-end C# page, I need to send parameter values for the individual fields inside of the WHERE clause (in this example, both the ClientID & LocationName fields) The current C# code looks like this: String SQLText = "SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE ClientID = @ClientID AND LocationName = @LocationName ',10)"; SqlCommand Cmd = new SqlCommand(SQLText, SqlConnection); Cmd.Parameters.Add("@ClientID", SqlDbType.Int).Value = 7; // Insert real ClientID Cmd.Parameters.Add("@LocationName", SqlDbType.NVarChar(20)).Value = "Default"; // Real code uses Location Name from user input SqlDataReader reader = Cmd.ExecuteReader(); When I do this, I get the following code from SQL profiler: exec sp_executesql N'SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable (''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)', N'@ClientID int,@LocationID nvarchar(20)', @ClientID=7,@LocationName=N'Default' When this executes, SQL throws an error that it cannot parse past the first mention of @ClientID stating that the Scalar Variable @ClientID must be defined. If I modify the code to declare the variables first (see below), then I receive an error at the second mention of @ClientID that the variable already exists. exec sp_executesql N'DECLARE @ClientID int; DECLARE @LocationName nvarchar(20); SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable (''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)', N'@ClientID int,@LocationName nvarchar(20)', @ClientID=7,@LocationName=N'Default' I know that this method of adding parameters and calling SQL code from C# works well when I am selecting data from tables, but I am not sure how to embed parameters inside of the ' quote marks for the embedded WHERE clause being passed to the function.

C# - MVC Action With ApplicationPath? stackoverflow.com

i'm creating a mvc application and i'll use under subdomain like http://myapp.mycompany.com This subdomain is pointing to app subdirectory, but my actions are always generated with applicationPath (subdirectory) like: http://myapp.mycompany.com/myapp/Home/About // I want just this without additional paths http://myapp.mycompany.com/Home/About Is there any configuration related to this? Is this the correct way to generate links? <%= Html.ActionLink("About", "About", "Home") %>

C# - What Is The Most Popular Website Written stackoverflow.com

I am trying to justify writing a website in asp.net that has the potential to be as large as wikipedia. Are there any large websites content driven websites that have been written asp.net?

C# - Can Determine If There Is An Open Source Software For A Specific Purpose stackoverflow.com

We are going to write an entire new application for a reservation system. In this system experts specify their free time in elaborated calendar and users seek them through searched and finally reserve the expert and his time. We prefer to find an open source program like this and try to evolve it instead of creating it from scratch. In this manner our time is saved and that open source program will be completer too.

C# - Read Data From SqlDataReader? stackoverflow.com

I have a SQL Server 2008 database and I am working on it in the backend. I am working on asp.net/C# SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { //how do I read strings here???? } I know that the reader has values. My SQL command is to select just 1 column from a table. The column contains strings ONLY. I want to read the strings (rows) in the reader one by one. How do I do this?

C# - Use UserControl To Display SqlDataReader Data? stackoverflow.com

i try to use userControl to display SqlDataReader data. in the main page public SqlDataReader Data2; ... <uc1:WebUserControl ID="WebUserControl1" RData1="<%=Data2 %>" runat="server" /> and in the userControl Repeater1.DataSource = RData1; Repeater1.DataBind();........ But i keep getting this error Cannot create an object of type 'System.Data.SqlClient.SqlDataReader' from its string representation '<%=Data2 %>' for the 'RData1' property.

C# - Replace Hard Coded Values With Database Values? stackoverflow.com

I'm trying to implement this tag cloud: [URL] ...and I need the replace the hard-coded values below with those coming from my database? [code].... I've created the following sql string which returns the data in the format expected string/int or value/key SELECT Tag, COUNT(Tag) AS Counter FROM dbo.CtagCloud GROUP BY Tag HAVING (COUNT(Tag) > 3) ORDER BY Counter DESC

C# - Getting Variable Values Out Of XSLT File? stackoverflow.com

I wanted to find out if there is a way of getting a parameter or variable value out of an XSL file. For example, if I have the following: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:variable name="username" select ="usertest"/> <xsl:variable name="password" select ="pass"/> <!-- ... --> </xsl:stylesheet> I would like to read the username and password values from the XSL and use them for authentication. I am using ASP.Net and C# to perform the actual transform on an XML file. share code with me that would allow me to read the XSL variables from ASP.NET/C#.

C# - Change Rendering Order Of Controls? stackoverflow.com

I found this article on how to manipulate the rendering sequence of asp.net controls.: [URL]I placed some placeholders on the page to encapsulate the controls i want to move around. The problem is, that RenderChildren does render the controls without the html i placed into the placeholder like this: <asp:PlaceHolder id="phOneToMove" Runat="server" Visible="true"> <tr> <td><asp:Literal id="label1" Runat="server">Caption</asp:Literal></td> <td> <asp:TextBox ID="textbox1" runat="server"></asp:TextBox> </td> <td> <asp:RequiredFieldValidator ID="validator1" Enabled="true" ControlToValidate="textbox1" runat="server" EnableClientScript="False" ErrorMessage="error"></asp:RequiredFieldValidator> </td> </tr> </asp:PlaceHolder> The controls are rendered without the tr and td around.How can I handle this? All I want is to change the order of the placeholders like in this example phOneToMove.

Forms Data Controls :: Insert Data Using EntityDataSource In FormView - C# forums.asp.net

I am new to formview .My formview works fine, when I insert data into the database directly and then do an update on it. It throws an error when I try to insert a new record.  The error just says "An error occurred while updating the entries. See the inner exception for details." How to insert data into the table using an entity dastasource?

Integrate HTML / Design With C# Code In MVC? stackoverflow.com

We're working on a new ASP.Net site. The last major site we did was in classic ASP--the procedure we used there was to have the HTML completed first, then "bring it to life" with the ASP code. In the ASP.Net world, how does this work? I.e. how do the designers do their work if much of the mark-up is actually being generated by the server controls? We are also looking at ASP.Net MVC as a potential lightweight alternative. Would be very interested to know what was worked best for people in both scenarios in terms of working with the designers and integrating their work with the code. UPDATE: I refined what I was asking here, not exactly the same question but similar enough so this one could probably be merged with it.

Localization :: Format Money In Two Formats In C# forums.asp.net

i want to format money in two formats 1) US dollors like this $126,765 2) is normal only seprate with comma when thousand occurs like this 126,765

C# - How To Get Date And Time Formats Based On Culture Infomation stackoverflow.com

What I want is..If culture is en-US then string dateFormat="MM/dd/yyyy"; string timeFormat="24.00 hrs"; If culture is en-GB then string dateFormat="dd/mmyyyy"; string timeFormat="24.00 hrs"; and so on for other countries..Now how do I get these date and time format values ? What are the standards? Like which all countries use similar date/time formats and which ones don't ?ok I tried this :- DateTime myDate = new DateTime(); string us = myDate.ToString(new CultureInfo("en-US")); string us gets value =1/1/0001 12:00:00 AM Now how do I extract "dd/mm/yyyy" and "24.00 hrs" out of this...in my Dateformat column in my Table... I want to store STRINGS such as dd/mm/yyyy or mm/dd/yyyy NOT dates..In my TimeFormat column in the table, the values to be stores are STRINGS too, like I need to store either "24:00hrs" or "12:00hrs" How do I do this now ?**using ShorTimePattern returns these values as h:mm tt and HH:mm If I want to store the values in my DB exactly as "24:00hrs" and "12:00hrs", how do I use these values..h:mm tt and HH:mm,which one is for 24 hr format and which for 12 hr format ?**I want the information about Decimal Separator and Thousand Separator too based on the CultureInfo...whats the property for that ?

Difference Between Asp And C# ? stackoverflow.com

Are asp and c# completely different things or ..? Is asp a language or asp.net? Are c, c++, c# languages? What is a framework, stack, language

MVC ::difference Between C# And VB.NET? forums.asp.net

I am in the process of learning MVC, and thought I would parallel the work in both C# and VB.NET.  I ran into a snag when right-clicking in an action method inside of a controller to add a view - in C# if I choose to strongly type the view it includes all the objects in the models folder in the drop-down list for selection; however, in VB.NET none of the models are available in the list.  Is there some step I need to take in order to make the models objects available in the drop down for selection?

C# - Creating A Generic Data Editing User Control? stackoverflow.com

I have a user control which has a Gridview and a listview, I want to make this control generic so that I can just pass the type of the class I want to edit, which would be a linq entity, and then it would automatically do the rest, so far I havent had any success and I was wondering if anybody knows a tutorial or some info about doing this?

C# - Add Controls Dynamically To Form? stackoverflow.com

I do not know how to add controls dynamically to the form using c#.net, I know this with vb.net but i need to know the syntax in c#.

C# - Exception Handling Internal Bug? stackoverflow.com

Code: public static void Test() { try { OpenConnectionToDatabase(); //Opens a connection to Oracle DB } catch(Exception e) { e.Data.Add("Query:", command.CommandText); throw e; } } When this code is executed when the Database server is being shutdown and the communication is disrupted, .NET throws the following error: Item has already been added. Key in dictionary: 'Query:' Key being added: 'Query:' at System.Collections.ListDictionaryInternal.Add(Object key, Object value) How can this be?

C# - .NET Exception Handling Lookup From A Table? stackoverflow.com

My manager designed a table exactly like this [Exception] PK | ExceptionId ExceptionCode varchar(100) ExceptionDesc varchar(255) ExceptionMSG varchar(255) I'm using ASP.NET Webforms and using stored procedures/ADO.NET for DataAccess. Now he does not want me to hard code validation in stored procedures nor in the code behind, but to catch the constraint exception message and look up the same error message in the database and look for the message that we want to show. I wonder if his design will work or should I explain to him that something is wrong here.

Browser Not Handling Exception From AJAX Panel - C# stackoverflow.com

i am having trouble catching errors in an AJAX panel. Even when i throw an exception in the c# code behind the front end completely ignores it. Here is the code i have setup, can anyone see why? I ideally want to show a js alert window on error. protected void btnX_Click(object sender, EventArgs e) { throw new ApplicationException("test"); } protected void ScriptManager_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e) { ScriptManager.AsyncPostBackErrorMessage = e.Exception.Message; } Markup: <script type="text/javascript" language="javascript"> Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler(sender, e) { window.alert(e.get_error().name); } </script> <asp:ScriptManager ID="ScriptManager" runat="server" AllowCustomErrorsRedirect="true" OnAsyncPostBackError="ScriptManager_AsyncPostBackError" />

C# - How To Return A Value Based On The Type Of The Generic T stackoverflow.com

I have a method like: public T Get<T>(string key) { } Now say I want to return "hello" if the type is a string, and 110011 if it is type int. how can I do that? typeof(T) doesn't seem to work. I ideally want to do a switch statement, and return something based on the Type of the generic (string/int/long/etc).

C# - SOAP Generic Type Serialization? stackoverflow.com

We have created a class to wrap the payload of web service response with common information as follows. public class ItemResponse<T> : Response { /// <summary> [code]...

C# - Cannot Implicitly Convert Type System.Collection.Generic.IEnumberable stackoverflow.com

I'm receiving this error in my Linq statement --- Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'hcgames.ObjectClasses.ShoppingCart.ShoppingCartCartAddon'. An explicit conversion exists (are you missing a cast?) From this query ShoppingCartItems items = Cart.GetAllItems(); ShoppingCartCartAddons addons = Cart.GetAllAddons(); var stuff = from x in items select new ShoppingCartItem() { ProductID = x.ProductID, Quantity = x.Quantity, Name = x.Name, Price = x.Price, Weight = x.Weight, Addons = (from y in addons where y.ShoppingCartItemID == x.ID select y) };

C# - Using Outputcache Together With Urlrewriting stackoverflow.com

I've got a problem using outputcache together with urlrewriting. We've got an application that rewrites url (IE [URL]). Based on the URL (/about/) we figure out which content to show. Now we're trying to add outputcache to that page: < %@ outputcache duration="600" location="Server" varybyparam="Custom" varybycustom="RawURL" %> And in the Global.asax we override GetVaryByCustomString like below: public override string GetVaryByCustomString(HttpContext context, string custom) { if (custom == "RawUrl") { return context.Request.RawUrl; } else { return string.Empty; } } However, when we publish the page i'd like to invalidate the cache so that the editors see the change directly. But no matter what I try, I cannot seem to invalidate the cache. If I'd like to invalidate "/about/" I would like to do this: HttpResponse.RemoveOutputCacheItem("/about/"); That doesn't work unfortunately. The only thing that seems to work is: HttpResponse.RemoveOutputCacheItem("/page.aspx"); This clears the cache for all my pages, not just "/about/". Is there any way to invalidate the cache based on the url? Or should we provide a cache key or something per page to be able to invalidate the cache programmatically?

C# - Enable OutputCache With An IHttpHandler? stackoverflow.com

I have an IHttpHandler that I would like to hook into the OutputCache support so I can offload cached data to the IIS kernel. I know MVC must do this somehow, I found this in OutputCacheAttribute: public override void OnResultExecuting(ResultExecutingContext filterContext) { if (filterContext == null) { throw new ArgumentNullException("filterContext"); } [Code]....

C# - How To Add The Footer Row Dynamically In Gridview With Textboxes stackoverflow.com

how to add the footer row dynamically in gridview. with textboxes..

C# - Visual Studio 2010's Silverlight Support ArrayList? stackoverflow.com

Does Visual Studio 2010's Silverlight support ArrayList? If yes then how to use it, if not then why? How to use ArrayList in Silverlight?

Visual Studio 2010 Express C# Limitations When Develop The Nerddinner Mvc Website stackoverflow.com

I am trying to develop the nerddinner mvc website, so I downloaded Visual Studio 2010 Express but I do not see an option for MVC or even asp.net website. Can I download this for Visual Studio?

C# - Can Create A PDF Quotation File From Winform stackoverflow.com

Assuming i have a winform that has a button called "Create a Quote". Once user clicks it, a PDF File gets created on desktop. The PDF File has a fixed design/structure e.g. the logo is at the top left corner, the headers are fixed, etc. However, the data it self is pulled from a database. As you see above, Quotation #, Description, Qty, U.P (USD), T.P (USD) records should be fetched from the db and dumped in the pdf template then create the pdf for user.

C# - How To Efficiently Send Large Files From The Database To The Browser stackoverflow.com

In my web application I am working with files. Some files are very large. I use Response.Write() to write the file to the browser. This goes well for the smaller files, but for large files this can take a while and the bandwidth is fully used. Is it possible to split large documents and send it piece by piece to the browser? Are there other ways to send the document quicker to the browser?I hold the document as a property of an object.

C# - Improve Design Of GUI / Website stackoverflow.com

So i am using visual studio 2008, asp.net 3.5, with the basic toolkit provided. Now i have made the gui which a lot of functionality but the design is very basic. nd looks too old. I need to give it a new look, a new feeling new designs. like the gridview, the buttons the textboxes, the menus look basic. this is not working for me. let me how should i go about doing this? 1) i have herd about tool kits but dont kno which ones are good..(dont want the really expensive ones) but if it is really good my company is ready to spend. 2) will the new VS 2010 or asp.net 4.0 make a difference. 3) The ajax toolkit or silverlight toolkit is any good? 4) i also need to show Charts and graphs now, currently using MS charts.. but now i need which is good.

C# - Getting Geographical Coordinates From Web Application? stackoverflow.com

I want to learn a user's location from his mobile device by web application. When user opens the website, with the help of a script we will learn if the device has a gps hardware.And if the device has gps hardware what are the current coordinates? I'm developing my project using ASP.NET

C# - How To Show / Hide Webforms stackoverflow.com

Hide/Close Loginform.aspx if userid/password is correct then show newform.aspx and how to create message box on asp?That will pop up Message: Login Successfull. How can i get the username value from loginform.aspx to newforms.aspx so thati can also get its value for my sql queries insert/update.

Find Dimension Of Flash File While Uploading In C# forums.asp.net

How to find dimension of flash file while uploading swf file just like we do for "jpg" or "gif" file. Anyone having c# version of following code [URL] Or, how to use this code in asp.net 2.0(c#).

C# - Encode Password Field? stackoverflow.com

I have the following code to encode password feild but it gets error when password feild greater than ten characters. private string base64Encode(string sData) { try [code]...

C# - Copy Several Textboxes Data Into Target Textbox Calling Same Function stackoverflow.com

I have several input textboxes with different id and class name. I want to track changes in any of the input textboxes, and reflect it into target textbox, but don't want to replicate the function for every individual textbox. Is it possible to use one function for all?

C# - Elmah: Exceptions Without HttpContext? stackoverflow.com

I spawn a thread on Application_Start and would like to log exceptions. There is not Context/HttpContext/HttpContext.Current, so how might i get it to log?ATM it does not catch any exception in my threads and if i write ErrorSignal.FromCurrentContext().Raise(ex); i get an error about context cannot be null.Maybe i can create a dummy HttpContext but somehow i dont think that will work well.-edit- i tried ErrorSignal.Get(new HttpApplication()).Raise(ex); and it doesnt seem to pick up that exception.

C# - ELMAH - Only Sending Specific Exception Type Via Mail stackoverflow.com

I have ELMAH set up for a webapp, logging exceptions to a SQL server. I wish to have ELMAH send me an email too, but only when a specific exception is thrown (ie. MySpecialException). ELMAH must still log all exceptions to SQL server. I know you can do it programmatically in global.asax, but I'd prefer to use web.config. So, how do I restrict ELMAH error mails to filter out everything but a specific exception type, using web.config? UPDATE The filter ended up looking like this: <test> <and> <not> <is-type binding="Exception" type="MyApp.MySpecialException" /> </not> <regex binding="FilterSourceType.Name" pattern="mail" caseSensitive="false"/> </and> </test>

Forms Data Controls :: How To Change The Column's Name Of Dataset Programmatically With C# forums.asp.net

Base on different conditions the progam uses different Sql which every one has different select names. How can I change the Dataset Columns name programmitcally which matchs the FormView  Order . Or some how change the   <%#Eval("Order")%> text in asp:TextBox <asp:FormView ID="DetailView" runat="server" Width="704px" OnPageIndexChanging="DetailView_PageIndexChanging"> <ItemTemplate> <table height="400" cellpadding="0" cellspacing="0" style="width: 511px"> <tr><td width="%50" valign="top" >TR</td><td> <asp:TextBox ID="TextBox5" Text='<%#Eval("Order")%>' runat="server" Width="192px"></asp:TextBox> </td><td></tr>,/table> </ItemTemplate> </asp:FormView>

C# - Best Way To Add A Column To An Existing Dataset stackoverflow.com

I have two extremely long queries that I am running on multiple tables, using an INNER JOIN. The only difference between these two queries is that they take different input values for one of the WHERE clauses, which they get from two separate DropDownLists. The results of these queries are identical, save for the time1/time2 columns.string query1 = "select Name = t1.name, time1=(SELECT hours FROM table3 WHERE street=list1.selectedvalue), t2.address from [table1] t1 INNER JOIN [table2] t2 ON t1.param = t2.param ORDER BY Name"

Edit Dataset Column Value In C#? stackoverflow.com

i have dataset having one table have 5 columns fill data from database. When i run application datatable contains more than 50 rows, I would like to update value of datatable after getting data from databse. My requirements are This table have few cells having Null value, I would like to replace null with "-" ? One column is System.datetime datatype, where i would like to remove time. I would only like to have date? Here i am thinking that i apply one loop of rows present in datatable and update cells accordingly. But i am searching any direct update method?

C# Return Identity After Insert Using SQL DB bytes.com

I need to know how to return th Id after inserting row, I can do it by many ways, but I need to know why my code doesn't work? [Code]....

C# - Whenever RewritePath() Is Called, Page.IsPostBack Is False? stackoverflow.com

I'm developing a custom URL Rewriter for a ASP.Net 3.5 project. This rewriter is not functionally different than most rewriters out there, the only difference being that the friendly URL collection is not loaded from a web.config file -- it's coming from a database instead. I made the naive assumption that it would be easy to develop a custom rewriter module from scratch, but now I know the mess I put myself in. I digress; let's go straight to the technical issues. While testing the rewriter, I set up a friendly url that would take the user to a web form. Postbacks from this form should not alter the friendly address, as anyone would expect, sohttp://my.web.site/app_root/FriendlyURL is always rewritten asttp://my.web.site/app_root/not_friendly/form.aspxThings are fine when the browser first loads the FriendlyURL. The page comes up and is completely functional. However, when the form is posted back to the server, the page simply reloads but, at server-side, IsPostBack is false. It's like F5 was hit, except that a HTTP POST had indeed occurred.Unsurprisingly, when the interaction occurs through the "unfriendly" URL, the POST action triggers the postback as expected. This evidence suggests that HttpContext.RewritePath is somehow messing with the page lifecycle in a way that it loses sense of the postback operation.

C# - Performing Authorisation/authentication Between Webservices? stackoverflow.com

i am developing webservices.In that i want to maintain state information so that all WebMethods could be access only after Login.I have tried but getting problem.I am attaching my code.Any other alternative will also be welcomed. [ WebService(Namespace = "http://amSubfah.org/")] [ [code]...

C# - Retrieving Keys And NewValues Within A Formview With Manual Data Binding stackoverflow.com

I have a Formview binded in the code file to a generic list. Now, upon editing of a record, I wish to access the Keys and NewValues out of the FormViewUpdateEventArgs parameter of the ItemUpdating event handler method. From what I've tried and searched over the internet as of now, I've come to know that updated values are only available if the Formview is set a data source control on the markup page else they'd be null. Is this true? Secondly, at this moment I am casting the sender object to formview and individually filling each object property by using FindControl method to find and retrieve values present in the controls. Is this the best way to do this task? As an example, this is what I am doing atm: FormView currentForm = (FormView)sender; ListObject.ID = new Guid(((HiddenField)(currentForm.FindControl("hdnID"))).Value); ListObject.Name = ((TextBox)(currentForm.FindControl("txtName"))).Text;

C# - How To Extend ListItem To Be Able To Have Childs Inside BulletList stackoverflow.com

Using asp.net C#. I have BulletList, and I would like to add ListItem that will render with childs. That is, inside every <li> I can add more controls to be rendered.

C# - Find Datakeys In Oncheckedchanged Event ? stackoverflow.com

<asp:Panel ID="pnlFocusAreaPanel" runat="server" GroupingText="Focus Area" Width="800"> <table cellspacing="0" cellpadding="0" width="750"> <tr>[code]... i want to know how i find the datakeyvalue on checked event because updateQuery in checked event is generating exception.

C# - TreeView Control Unexpected Event Behavior? stackoverflow.com

In the MSDN is writen about TreeNode that: "By default, a node is in selection mode." "To put a node into selection mode, set the node's NavigateUrl property to an empty string." "When a node is in selection mode, use the SelectAction property to specify which event or events are raised when a node is selected." "Setting TreeNodeSelectAction value TreeNodeSelectAction.Select Raises the SelectedNodeChanged event when a node is selected." Here is the problem and possibly a bug in the control: When I set the TreeNode object PopulateOnDemand value to true and call the Collapse() function on that node.Then the TreeNodeExpanded event is raised in addition to the SelectedNodeChanged event.This is in complate contradiction to what is writen in the MSDN.According to the MSDN this sould happen only if TreeNodeSelectAction Property is set to TreeNodeSelectAction.SelectExpand value. Here is the code: <asp:TreeView ID="TreeView1" runat="server" AutoGenerateDataBindings="False" onselectednodechanged="TreeView1_SelectedNodeChanged" ontreenodepopulate="TreeView1_TreeNodePopulate"> [code]...

C# - Receiving System.FormatException After Using ClientScript? stackoverflow.com

I'm trying to code an onclick behaviour for a GridView by using the following codebehind-code: protected void gridProcesses_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';"; e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';"; e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.gridProcesses, "SelectProcess$" + e.Row.Cells[0].Text); [Code]....

C# - Truncate Text In RadGrid Column? stackoverflow.com

using Telerik RadGrid* in a LINQ context, with ASP.NET/C#, how to truncate text to a maximum length when displaying in columns? By maximum, I mean if original string's length is shorter than the specified maximum length, no errors will raise.I have seen many examples of this on the net, but it seems that the Container.DataItem used to achieve this is different when using LINQ. Sometimes we see DataItem as a method, sometimes not. Examples are usually using a DataSet.Here's an example found (source) : <asp:TemplateField HeaderText="Description"> <ItemTemplate> <%# ValidateString(Container.DataItem("Description")) %> [code]...

Security :: C# Active Directory Tutorial? forums.asp.net

I'm looking for a website or a tutorial of some kind to help me get started on this part of my project.   I need my intranet website to use the already in place active directory.  However, I have never done this before and have no idea where to start.

How To Consume A Atom Feed From Blogspot On C# Website www.sitepoint.com

I need to consume a atom feed from blogspot on my asp.net C# site. The problem is I am getting this error when trying to load the XmlDocument from the URL: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1. I tried going through a webresponse and replace that byte with string.Empty. But still did not work. The strange thing is I have consumed a atom feed before. Tried using my current code with another atom feed and it works no problem. After trial and error, I found the difference is the working one is contentType text/xml while the wone that does not work is application/atom+xml. If i write out the response from the working one... I see the feed. If I write the response from the non working one, i get jumbled up chars. Like if you open a .exe file in notepad. Funny chars and things. I have tried changing the Encoding, but nothing worked.how do I handle atom feeds with content-type of application/atom+xml?

C# - How To Point URL From Global File Using URL Routing 3.5 Without Parameters stackoverflow.com

How to point url from Global file using URL routing 3.5 asp.net without parameters? For example: [code]....

C# - How To Get A Null Value From Database To A Checkbox In FormView stackoverflow.com

i want parse null value and disable checkbox in form view how can i do that that's my current code: <asp:CheckBox ID="FLPCheckBox" runat="server" Text="Full Load Passed" Checked=' <%# (Eval("FullLoadPassed")==DBNull.Value ? false : Eval("FullLoadPassed"))%>' />

C# - Return Different Views In A Controller? stackoverflow.com

If I have a controller and I want to return a view based on what my conditional logic goes to, is that possible? I have different types of models that i want to insert into a view DEPENDING on my conditional logic (if statements) Can i do this? and how would I do this

C# - Passing JSON Serialized Data Via Hidden Field? stackoverflow.com

In ASP.NET WebForms I want to pass arbitrary data from server to client and back again. I am serializing to JSON and have been simply producing JavaScript that creates the object on the client. I have no problem sending data to the server with ajax, but there are situations where I also want to send a Javascript object data back to the server on postbacks. So I guess it needs to be in a hidden field. 1) What is the best way to do this in terms of minimizing complexity and optimizing space and efficiency? In researching this I discovered Protocol Buffers but there does not seem to be a good C# implementation. I did find one, but it was a couple years old and self-described as buggy so that scared me. 2) If I just pass a JSON string, how can I be sure it will be safe to include as the value for a hidden field? Is there any reason I might not want to do this? I could Base64 encode, but it seems like this adds a lot of overhead. What is considered the best or preferred method?

C# - Getting Action Filters List From Base Controller? stackoverflow.com

In Short: Does any know a way from the base controller to get a list of actionFilters being applied to the current executing action? The Long:I am using ASP.NET MVC 1.0 framework. I have a "RequireSSL" actionFilter that I've recreated for checking out, however, if someone leaves the checkout and goes back to the store I would like to forward them back to non-secure version of the site.It would be helpful in the base controller (I am using a custom base controller that inherits from the default Controller) to find out what actionFilters are being applied to the current action.I could include this into the global.asax.cs

Calling A Method From A Cs File? forums.asp.net

I have a cs file next to the aspx file, I have a method in the cs file and want to call it from the aspx file.. I think it must be easy but I just dont know how to do it ...

C# - Calling Response.TransmitFile() From Static Method stackoverflow.com

I have a number of pages which need to support exporting data to an Excel spreadsheet. I can generate the Excel files just fine, but I'm trying to work out how to abstract this behavior so it's easily reusable from all of the pages where I need it. My current idea is to use a static utility method, as follows: [Code].... The click handler where I'm calling SendExcelFile looks like this: protected void lnkExport_Click(object sender, EventArgs e) { List<List<string>> dataList = GatherDataForSpreadsheet(); Utility.SendExcelFile(this, "fileNameForDownload.xlsx", dataList, "MyReports"); } This code works just fine as an instance method of the calling page. As a static method, though, it doesn't work at all. When I click the button that invokes this, the browser shows the loading animations indefinitely, but never prompts for a file download. EDIT: If I remove the call to File.Delete() at the end, the method works as expected. Does Response.TransmitFile() do the transfer asynchronously? EDIT 2: I just needed to call Response.Flush() before I deleted the file.

C# - Pass Parameters To Crystal Report? stackoverflow.com

crystal report has two parameters field, however, i used three method searched, all failed. Error is missing parameter values. sure parameter is passing by query string URL] checked by Label However, do not know why Error is missing parameter values. Method 1 // First parameter ParameterFieldDefinitions crParameterFieldDefinitions; ParameterFieldDefinition crParameterFieldDefinition; ParameterValues crParameterValues = new ParameterValues(); ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue(); crParameterDiscreteValue.Value = Request.QueryString["ID"]; crParameterFieldDefinitions = objRpt.DataDefinition.ParameterFields; crParameterFieldDefinition = crParameterFieldDefinitions["Cheque_IssueRecord_Secretary_Review_TT_ID"]; crParameterValues = crParameterFieldDefinition.CurrentValues; crParameterValues.Clear(); crParameterValues.Add(crParameterDiscreteValue); crParameterFieldDefinition.ApplyCurrentValues(crParameterValues); // Second parameter ParameterFieldDefinitions crParameterFieldDefinitions2; ParameterFieldDefinition crParameterFieldDefinition2; ParameterValues crParameterValues2 = new ParameterValues(); ParameterDiscreteValue crParameterDiscreteValue2 = new ParameterDiscreteValue(); crParameterDiscreteValue2.Value = Request.QueryString["tCOMDB"]; crParameterFieldDefinitions2 = objRpt.DataDefinition.ParameterFields; crParameterFieldDefinition2 = crParameterFieldDefinitions2["tCOMDB"]; crParameterValues2 = crParameterFieldDefinition2.CurrentValues; crParameterValues2.Clear(); crParameterValues2.Add(crParameterDiscreteValue2); crParameterFieldDefinition2.ApplyCurrentValues(crParameterValues2); Method 2 //objRpt.SetParameterValue("Cheque_IssueRecord_Secretary_Review_TT_ID", Request.QueryString["ID"]); //objRpt.SetParameterValue("tCOMDB", Request.QueryString["tCOMDB"]); Method 3 var value = new ParameterDiscreteValue(); value.Value = Request.QueryString["ID"]; objRpt.ParameterFields["Cheque_IssueRecord_Secretary_Review_TT_ID"].CurrentValues.Add(value); var value2 = new ParameterDiscreteValue(); value2.Value = Request.QueryString["tCOMDB"]; objRpt.ParameterFields["tCOMDB"].CurrentValues.Add(value2); This crystal report database use stored procedure, parameter field is automatically added, after added i removed @ character do not know why parameter missing

C# - MVC.NET Drag And Drop Toolbox To Build Layout Page At Runtime? stackoverflow.com

I'm trying to create a drag and drop style toolbox using MVC.NET, similar to Visual Studio for an application I'm developing. Basically the first part of the app allows the user to create a custom layout which will be used throughout the site. I've tried a few different approaches to this but can't seem to hit one that works. My last attempt used the jQueryUI modal to allow the user to input the attributes of the item, say a div. This works and I can use AJAX to post the attribute values to my controller. This is where I get stuck. I don't know what would be the best way to append the item to the layout page. I was toying around with Streamwriter but it was proving difficult to keep track of where on the page the item was placed. I'm in the process of trying to do it via jQuery, but I'm just wondering if there is any options in the jQuery library or MVC.NET framework which I don't know about that might be useful.