Forum Array

C# - How To Delete A GridView Row

I have this code until now: <asp:TemplateField ShowHeader="False" ItemStyle-Width="150px" HeaderStyle-BackColor="#003ca1" HeaderStyle-ForeColor="white"> <ItemTemplate> <asp:LinkButton ID="linkDelete" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick='return confirm("Diesen Eintrag wirklich löschen?");' Text="Löschen" /> </ItemTemplate> </asp:TemplateField> At this moment, the GridView deletes the row physically.I want to catch this in CodeBehind, cancel the delete-operation and want only set a "IsDeleted"-Flag in the database.

View Answers

Very Similar Questions

C# - How To Add The Footer Row Dynamically In Gridview With Textboxes
how to add the footer row dynamically in gridview. with textboxes..

Web Forms :: How To Link .cs(class File) With .aspx.cs File
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 my question is 1. i want to connect Studentinfo.cs class to my login.aspx.cs...So that i can call the methods in to do it?

Reorder Table Rows (drag-and-drop) Along With Their Sub Rows
I have a table which looks like this (simplified for the example): <table> <tr class="lvl_1"> <td> Level 1 [Code].... I'm now looking to implement drag-and-drop sorting functionality, make it possible to rearrange the level 1 and two rows. The tricky part is that once I start moving a row, the corresponding children (and grand-children, if any) should move along with it. Is this even possible with the current markup, or do I have to rearrange the code?

Motorola Droid 2 :: Deleting Phone Contacts Without Deleting From Facebook
I recently synced my Facebook contact to my phone so that I could have their Facebook pic as the pic on my phone. I do not want to have all my Facebook contacts in my Phone. I tried deleting them from my phone but it says that I have to delete them from Facebook in order to do so.

Delete Key Does Not Delete The Underlying Html
I have used freetextbox in my application. My web page has one freetext box, On command button. On clicking on the command button it insert some text into freetext box. Actually these text are a string of html like this. <SPAN id="15aac2e0-0de8-4a39-8653-a5f0e60ad5bd">Y</SPAN> in design mode it shows  Y only and in html it show whole html string given above. My problem is when i delete the Y in design mode by pressing delete key from my key board. It only delete Y deos not delete <SPAN id="15aac2e0-0de8-4a39-8653-a5f0e60ad5bd"></SPAN> tag. My code is given below. [code]... When I delete the text in design mode is underlying <span id=".................." ></span> deos not delete.

When Add Another Row Its Not Generate New Row That Replace Only Old Row?
i have done dynamic row create using asp:table control..but the problem is when add another row its not generate new row that replace only old row..whenever i count the tr again its take the count i want no. of row when user done each button click.. here codes.. [Code]....

Forms Data Controls :: Find All Selected Row From Gridview?
I want to find all selected rows from gridview in one step

MVC :: Add An Image Instead Of Delete Link In Html Helpers?
<%: Html.ActionLink("Delete", "Delete", new { id=item.Emp_ID })%> how to add an image instead of  first "Delete"

Forms Data Controls :: Update A Particular Row In A Gridview Using C#?
i created a gridview, in that i retrived the student names and besids that i put a check box, when ever i check the  check box and click on the Update button, the value of student class will be incremented by one. example if a student is in IX class that student should be Promoted to X class.

C# - How To Insert A Copy Of A Row (with A New Identity) Using LINQ To SQL
I have a number of tables that together make up a "Test" that somebody can take. There are multiple types (scripts) of Test a person can take. I'm working on an Edit function that will allow somebody to edit the Test Questions. I want these edited questions to show up on all new Tests of that type, but still show the old questions when viewing past test scores. To do this each "Test" has a TestId auto-increment identity (along with its name). When a test is edited I want to make a copy of the test with a new TestId and present the questions for editing. So what is the best way to make the copy and insert it into my table using LINQ to SQL? This: DataContext db = new DataContext(ConnectionString); //Copy old test into identical new test but with a different script ID var oldScript = db.TestScripts.Single(ds => ds.TestScriptId == oldScriptID); var newScript = oldScript; db.TestScripts.InsertOnSubmit(newScript); db.SubmitChanges(); of course tells me that I Cannot add an entity that already exists. Is the only way to do this to go through every column in the TestScript and copy it manually, then insert it, and the database will give it a new Id?

Delete All Sentence Rows Which Does Not Contain $bit?
I have a link in my rows $bit=""; $query = mysql_query("DELETE FROM *table* WHERE sentence........"); I need to delete all sentence rows which DOES NOT contain my $bit.

C# - Parse JSON String Into DataSet?
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 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?
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?
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.
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
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?
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?
I want to extract all images link to so I can utilize all images freely. how to do in 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="" 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>

Update Rows From MSSQL To MySQL
Is there any way where I can add the MySQL Server as a Linked server to MS SQL server? Is there any way where I can update a table in MySQL server based because a row was updated in MS SQL server using a trigger? Thanks, Amit

Single Row/column Marquee Tool
I have used PS7 for many years but have never found a practical use for the single row/column marquee tool,am i missing something? could someone enlighten me as to practical uses.

How Do I Link Layers Together In CS 2
How do i link layers together in CS 2 Can't find the little boxes i used to use in ver 7

Mysql Lock Concurrent Read Or Update Of Row?
I have table, and many(too many)requests for selecting from it a single row.After selecting a row, the script run update query to set a flag that is that row had been "selected".But as we have too many requests per time, in period between one thread select a row, and update its flag, another thread have time to select the same row.Select query get one row from the table, ordering it by some field and using LIMIT 0, 1.I need that DB just skip the row, that had been selected before.The engine is InnoDB.

Add New Row In Worksheet On Click Of A Button On Specfic Location
Hi,  guys, i need help in adding a row in a worksheet on click of a button and also on the specific location.If any of you guys come across, please help me.Thanks, Muddalli

Creating Rows Of Labes And Texboxes In A Form By Using Input Box OR Command Button
hello there... i'm in a deep deep trouble here and i need help very much... my problem is... i want to create a form (in VB 6) the allows user to add as many name and contact details in a from based on input box.the procedure is;first, an input box will appear prompting user to keyin the amout of name that he want to add (e.g 20). then, the form will appear showing 20 Textbox complete with numbered label (somewhat like this)NO NAME CONTACT NO EMAIL ID NO01 |Textbox | |Textbox | |Textbox | |Textbox |02 |Textbox | |Textbox | |Textbox | |Textbox |03 |Textbox | |Textbox | |Textbox | |Textbox |:::20 |Textbox | |Textbox | |Textbox | |Textbox |and if the user key in 70, 70 rows of textboxes and labels will appear and so on. And also, how to ensure that every information that is entered here is saved in a database (MS Access database)?OR:I've pre-create 5 rows of textboxes with labels like above. And now, everytime the user wants to add more name and details, all they had to do is to click a command button (sounds more practical isn't it?), a new row will appear together with the numbered label. (izzit possible to do something like this???)can someone help me with this? i hope i've described the problem clear enough. BILLIONS of thanks for anyone who can help me and you cant imagine how grateful i am for your help.

C# - Parse Using Regex Class Of System.Text.RegularExpressions
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?
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 is possible to have more than one element on a page, and that the element can be either or .

C# - XML Serialization In .NET?
I have xml like this: <?xml version="1.0" encoding="utf-8"?> <session xmlns="" name="" 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?
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=""> <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?
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
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
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# - Angle Brackets In Page Head Element?
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# - Import MD5 Passwords From A PHP App?
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
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?
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
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#
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?

How To Select A Row In A Gridview By Clicking Link Button
How to select a row in a grid view by clicking link button in with VB.

C# - How To Create Simple Stacked/segmented Html Bar
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);

AJAX :: Updateprogress In A Gridview Row?
I have put a updateprogress ajax nested in a gridview template.  However, when I click a button inside the gridview row, all of the rows in the gridview display the updateprogress gif at the same time.  When the user click a button on one row, how can I get the updateprogress to display itself only on that row index? here is my code:  <itemtemplate> <asp:Label ID="lblPriceQty" runat="server"></asp:Label> <div>........

C# - Get The Full Path From A Fileupload?
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
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
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
How can I control on HTML elements by using C# code in 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
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.

C# - MVC Action With ApplicationPath?
i'm creating a mvc application and i'll use under subdomain like This subdomain is pointing to app subdirectory, but my actions are always generated with applicationPath (subdirectory) like: // I want just this without additional paths 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
I am trying to justify writing a website in that has the potential to be as large as wikipedia. Are there any large websites content driven websites that have been written

Searching A DataGrid For A Specific Rows?
I have a DataGrid with a hundred results in it from an FAQ, in the following format. Code: [code] I would like to be able to choose a number of rows (typically one) that contains what I want. For example, if I were to look at the above DataGrid and search it for rows with the word "account" in the title I'd want it to pass me the first row, with the same id. If I were to want rows about software it would give me rows 2 and 3.

C# - Can Determine If There Is An Open Source Software For A Specific Purpose
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?
I have a SQL Server 2008 database and I am working on it in the backend. I am working on 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?
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?
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?
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="" 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#.

Can Insert Muiple Rows Into Table Using Entity Framework
i'm trying to use Entity Framework to insert into SQL SERVER 2005, using Visual studio 2008.the following codes are a Button onclick event,I want to insert into DB multiple rows at a time [Code].... however this does not work, it seems we can only insert into DB only one row at a time

C# - Change Rendering Order Of Controls?
I found this article on how to manipulate the rendering sequence of 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#
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?
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.

Multiple Row Formats In A ListView?
I have a ListView with about 10 rows. I have an item template for these rows and it is working correctly. I want to have two more rows in this ListView, but these rows do not match the item template as they have one more control in the first column. The layout of the ListView is based on an HTML table with 10 rows and 4 columns. For example, the first 8 rows have only an ASP.NET TextBox control in the first column and 2 rows have in an ASP.NET TextBox control and an ASP.NET Label control in the first column.

Localization :: Format Money In Two Formats In C#
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
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 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 ?

Forms Data Controls :: Update A Row In Gridview?
How to update a colums value of a Row in a gridview on Row Command Event Handler. I am using a SQL Datasource. [Code]....

Forms Data Controls :: Update The GridView Row?
I have 3 textboxes and one gridview. When i click on Edit button the entire will store data will store into particular textboxes. How to do it?

Difference Between Asp And C# ?
Are asp and c# completely different things or ..? Is asp a language or Are c, c++, c# languages? What is a framework, stack, language

MVC ::difference Between C# And VB.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?
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# - .Net Equivalent Of JSP Page?
What is the .Net equivalent of a JSP page?

C# - Add Controls Dynamically To Form?
I do not know how to add controls dynamically to the form using, I know this with but i need to know the syntax in c#.

C# - Google Page Rank Checking Script?
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# - Exception Handling Internal Bug?
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?
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#
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
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?
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
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
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?
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# - 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.

C# - Visual Studio 2010's Silverlight Support ArrayList?
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
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 website. Can I download this for Visual Studio?

C# - Can Create A PDF Quotation File From Winform
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
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
So i am using visual studio 2008, 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 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?
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

How To Insert Empty Row In Datagrid When Click The Button
i have Datagrid control  with 4 columns and a button outside Datagrid ,i am displaying some records in datagridwhen i click the button outside Datagrid  i  want to create a empty row in Datagrid

C# - How To Show / Hide Webforms
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.

Show / Hide Sections In A Datagrid Row?
I have a datagrid where each row has information on Employees in a company. I would like to allow each row the ability to show/hide extra information. My first idea was use the CollapsiblePanelExtender from the AJAX toolkit and have each row like this: <ajaxtoolkit:collapsiblepanelextender TargetControlID="panel2"> ExpandControlID="LinkButton1" [Code].... This works very well but it can be computationally expensive. The extra information panel has a lot of textboxes/labels, all of which gets its values from the database. Everytime the page loads all the data is got from the database at the start, some of it is hidden. Is there a better way to achieve my goal? Or is there a way to only load an employees extra details when the Show/Hide button is click?

Find Dimension Of Flash File While Uploading In C#
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 2.0(c#).

C# - Encode Password Field?
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]...

DataSource Controls :: Identify Row Of A Column Contains Null Value
having a table with  column having null values how to identify row of a column contains  null value? i tried isnull,nullif properties but such functions im getting emptied rows

Forms Data Controls :: Copy Data From Excel Row To Gridview Row?
I need to copy data from excel to gridview. I have to select a row and press Ctrl+C to copy from excel, then I have to paste it in Gridview.

C# - Copy Several Textboxes Data Into Target Textbox Calling Same Function
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?
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.

Web Forms :: Web Page That Allows Multiple Database Row Updates
We currently have a page with a listview control that has textboxes and an update button for each row. Users are able to update the database one row at a time.This is problematic in countries where the internet connections are very slow because a round trip is needed for each row update and this can become impossible to use.We need to create a page which allows multiple row updates so that each round trip is more productive.  There woudl be just one update button on each page and users could enter values into each row.  Clicking the update button would update each changed row of the database.We currently use linq 2 sql.  I would imagine that we could still use this in the above scenario??? Or is there a better data connection methode to use in this scenario.

C# - Copying The Entire Telerik Docklayout From One Page To Another Page
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# - ELMAH - Only Sending Specific Exception Type Via Mail
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>

SQL Server :: How To Insert Data Based On Gridview User Value On Row
I have three column comes from database table(Table1) and one column is for entering data for the user let us consider it look like this  ItemNo ItemName Qty  uservalue 001       A               50       20 002       A               20       5 003       B               50   004       C               60      10 005       D               40  006       E               90      15  ........ If its 300 row from database to gridview it will show 50 record with page navigation..What i need is i need to insert data in to database table which gridview row has user value..The output of the another table(Table2) will look like this after insert ItemNo ItemName   uservalue 001       A                    20 002       A                      5   004       C                    10 006       E                    15 

Forms Data Controls :: How To Change The Column's Name Of Dataset Programmatically With C#
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>

SQL Server :: How To Select Only One Row From DataSet
My DataSet gives a result like this when i bind to GridView BillNo     BillStation            Amt1         Amt2       Amt3       Amt4 Hyd  1              Hyd                  100              50          50           25  2              Hyd                  100              50          50           25 Bang   2              Bang                500            100        200           50   2              Bang                500            100        200           50 Delhi  3              Delhi                  50              25          50          100  3              Delhi                  50              25          50          100 As the rows from each group is same. I want to display only the first row from each group. [Code]....

C# - Best Way To Add A Column To An Existing Dataset
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 =, 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"

Jquery :: Toggling Table Row Changes Width Of Columns In Other Rows?
I have a table like the following: <table width="100%"> <tr class="clickme"> <td width="1%">A</td> [code].....