Forum Array

C# - Truncate Text In RadGrid Column?

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

View Answers

Very Similar Questions

Web Forms :: Set Text Box Height According To (table Column) Text
forums.asp.net
I have a multiline text box on page which has style "overflow: hidden" to hide the scroll bar. I want to set the vertical hight of that text box at runtime according to the string coming from table column. Is there any way of doing it? I have tried to put the text in array but its not working.... Dim myParas As Object myParas = Split(TextBox2.Text, vbNewLine) ln = UBound(myParas) + 1 TextBox2.Height = 22 * ln

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?

Forms Data Controls :: Retrieve Column Data From GridView For RowDeleting In C#
forums.asp.net
The date displays just fine in the grid.  I am having trouble with deleting the row in the grid.  I have researched and played with different things with the grid, but I can't seem to get it to work.  Most examples are in VB and I coding is C#.   What happens is the code (see *** in C#) doesn't return the column 0 (UserName) from the GridView.  So the next statement blows up becasue there is no UserName.  I used a ASP.Net VB book I got from a VB class I took to come up with the code. When I typed in "grdUsers.Rows(e.RowIndex)"... I got help from Intellisense, but the rest of the line ".Cells(0).Text"... I got no help.  I included below the code that I think is pertinent to the problem I'm having. [Code]....

C# - Hide Repeater Columns Based On User Privileges?
stackoverflow.com
how to hide a repeater column based on the user privileges. Say I have: <asp:Repeater ID="repeater" runat="server> <HeaderTemplate> <table id="table_id"> <tr> <th>Name</th> <th>Secret Info</th> <tr> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>' /></td> <td><asp:Label ID="Label1" runat="server" Text='<%# Eval("SecretInfo") %>' /></td> <tr> <ItemTemplate> <AlternatingItemTemplate> <tr> <td><asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>' /></td> <td><asp:Label ID="Label1" runat="server" Text='<%# Eval("SecretInfo") %>' /></td> <tr> <AlternatingItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> How would I only display the 'Secret Info' column to logged on users?

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>

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

SQL Reporting :: How To Change Text In Columns In SSRS
forums.asp.net
I need to create a complex report and export it to Excel.  In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. I am new to SSRS and tried out many ways but didn't get it.

C# - Getting Text Of .NET HyperLinkField In GridView
stackoverflow.com
I'm trying to get the text of a HyperLinkField in a GridView's OnRowDelete event (the HyperLinkField's text is the primary key of the row I wish to delete). I understand that you can't get the text using the code I've placed below; it only works for BoundFields (for HyperLinkFields, the string is ""). But, I've been unable to find a working answer for getting this text. How do I get the displayed text from a HyperLinkField? (VS2010 w/ ASP.NET 4.0 and C#) GridView Design <asp:GridView ID="teamGridView" runat="server" CssClass="gridView" RowStyle-CssClass="rowStyle" AlternatingRowStyle-CssClass="altRowStyle" HeaderStyle-CssClass="viewsHeader" OnRowEditing="Team_OnRowEditing" OnRowDeleting="Team_OnRowDeleting" OnRowUpdating="Team_OnRowUpdating" [code]...

C# - Modify Hyperlinkfield Text In Gridview?
stackoverflow.com
I am stumped on this one. I want to modify the text in a Hyperlinkfield of Gridview after the data is bound to it. I found similar code to this on msdn and I can't get it to work. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { e.Row.Cells[2].Text = e.Row.Cells[2].Text + "random text"; } I also tried similar code in the Page_PreRender event with no luck. I have also tried calling DataBind() before this one line of code with no help. I always just get "random text" in the cell without the data from the DB.

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?

SQL Reporting :: How To Sort Column Field And Add TOTAL Column In VS 2008
forums.asp.net
I am in VS2008 and in ReporViewer's Design page. I have "Fruits" as column fields and Months as row fields and Sales as data field. I have these columns:- Apple, Orange, Pear. However, I want it be displayed as Orange, Pear, apple. Any work around ? Also I need a 4th column adding the Apple, Orange and Peer numbers total. How to do it in design view in VS2008 ?

Write To Text File - Output The Result To A Text File
www.codingforums.com
What i would like is to output the result to a text file Code:

Read And Display Japanese Text From Text File
bytes.com
I posted a question regarding reading japanese text from a text file. Well, since I solved the problem, I thought I'd post my solution for the benefit of other people with the same problem. The plan was to make a script to read and display japanese text. I will use it for making a japanese proverb script and for a japanese language study script. Method : I wrote a simple kanji text file (saved with UTF-8 encoding) I wrote a simple PHP script to display the file contents (saved with UTF-8 encoding) I specified the content-type header for the HTML page : <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> *** All files have the same encoding. *** UTF-8 supports japanese characters. and it works! this is my PHP (and HTML) script : <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>PHP : Japanese Text File Read : Exercise 1</title> </head> <body> <?php $filename="japanese.txt"; //open file $fp = fopen($filename,'r'); //loop through each line in the file while($line=fgets($fp)) { //output current text file line print $line."<br>"; } //close file handle fclose($fp); ?> </body> </html> I know it's a very simple script, for testing purposes only. It displays the contents of the japanese text file line by line. The key was to save all files in the same encoding (I used UTF-8) and to specify the encoding / charset in the HTML header (<meta http-equiv="Content-Type" content="text/html; charset=utf-8">)

Printing Text In A Text Box Using Command Button
www.xtremevbtalk.com
I don't know how to insert a command button to print the text in a text box. Could someone please help me out? Thx heaps

Jquery :: Text Input Fields That Display Instruction (placeholder) Text
stackoverflow.com
What's the best way to have a text input field that displays instructions of what to enter in that field in gray. When you focus on that input field, the gray instruction text disappears and your input text appears black. If you erase your input text and focus away from that input, then the instruction gray text reappears. I've tried implementing this with jQuery, but I get all kinds of weird issues with different browsers. Sometimes when you go back a screen, the instruction text becomes black and no longer disappears, issues like that. Is there a standard javascript library for this? I can't find any! the instruction text can't be an image because it has to be available in different languages depending on the browser's language preference.

Jquery :: Appearing Default Text In Text Fields
www.daniweb.com
i made a tutorial for appearing default text in text fields.

JQuery :: Default Text On Empty Text Box
stackoverflow.com
I have a email form text box that while it is empty I would like it to have the value "E-Mail" And when you click on it the text goes away. If someone clicks on it and doesn't enter text. on Blur I would like for it to return to having the default text.I have been trying a few things but nothing is working.

The Check Box As Default Is Unchecked And When Checked Validates A Text Area For Text
www.sitepoint.com
Im trying to nut out a check box validation The goal- the check box as default is unchecked and when checked validates a text area for text CODE:

HELP!! Making Text Bold In Text Box
www.codeguru.com
i already posted this and i got help but the answers werent right. what i want to do is have a text box and three check boxes. one check box to make the text bold, one to make it italic and one to make it underlined. and when you enter text in the text box you can check the bold box and the text will turn bold right there. you dont check the box and then it turns to bold and from what you type from then on out is bold but instead it turns everything that is already in the box bold. some people told me to type if check is true then text1.fontbold. in when i do that it says invalid use of property. and i also tried text1.font.bold. please help me out!!

Three Columns Layout, Want Middle Column To Stretch Wider When Column 1 And 3 Are Empty?
stackoverflow.com
I have a 3 column layout using table-less design. [code].... The CSS: #left {width: 200px;float:left;display:inline;} #content {width: 600px;float:left;display:inline;padding: 0 10px;} #right {width: 160px;float:left;display:inline;} I am using a web application, and I can't change the layout. By can't change, I mean the div's with left/content/right cannot be removed. On some pages, both the left and right columns are completely empty. And I want the #content div to expand more than the 600px. is this possible, without altering the HTML?

How To Code For User To Press Enter To Execute Command
www.vbcity.com
Hello All -I have a text box into which the user enters text commands. The way it's set up now, as soon as the requisite text appears in the text box the appropriate command is invoked. It's a very simple series of If...Then statements:Private Sub txtCmdLine_Change()        If LCase(txtCmdLine.Text) = "new" Then        txtCmdLine.Text = ""        mnuFileNew_Click    End If    If LCase(txtCmdLine.Text) = "save" Then        txtCmdLine.Text = ""        mnuFileSaveAs_Click    End If    If LCase(txtCmdLine.Text) = "open" Then        txtCmdLine.Text = ""        mnuFileOpen_Click    End If            EtceteraHow can I "interrupt" the process so that the user must press the ENTER key after typing in the text command?Thanks very much,SZW

Regex - Regular Expression To Parse Whitespace-delimited Data?
stackoverflow.com
I have written code to pull some data into a data table and do some data re-formatting. I need some help splitting some text into appropriate columns. CASE 1 I have data formated like this that I need to split into 2 columns. [Code]... column is the first 11 characters That is easy.column 2 should contain all the text after the first 11 characters up to but not including the first number.The last column is all the text after column 2

Forms Data Controls :: Copy From One Textbox To Another In Gridview
forums.asp.net
I have 2 text boxes and a button within an EditItemTemplate field in a simple GridView: <asp:TemplateField HeaderText="Text"> <EditItemTemplate> <asp:TextBox ID="txtText1" runat="server" /> <asp:Button ID="bntCopy" runat="server" Text="Change" /> <asp:TextBox ID="txtText2" runat="server" Text='<%# Bind("text") %>' Enabled="false" /> </EditItemTemplate> <ItemTemplate> <asp:Label ID="lblText" runat="server" Text='<%# Bind("text") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> how I can transfer the text from the txtText1 Textbox to the txtText2 one when I press the btnCopy button, but preferably in the codebehind so that I can change the text before actually copying?

Programmatically Get The Coordinates Of An Item?
forums.asp.net
how can I Programmatically get the coordinates ( left, top or x,y ) of an item (like panel or text box) using ASP and C#

.net - Get Identity Column Value In C# 'Dataset' - Access Database?
stackoverflow.com
I want to retrieve identity column value after running Insert or Update (using Access DB in C#). How can I do it? i use a Typed dataset to fill and update...

Link Column
www.mogo-media.com
I've somehow lost the link column in the layer section.. (next to layer visibility).

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.

Layer Link Column Missing
forums.adobe.com
trying to upgrade my PS skills and working thru a PS CS book. I am working on a Layer session. The books shows a column that they call Layer Link mode. I is just to the right of the Visibility column.

Creating Column
www.mogo-media.com
Create Character Sequence Using Adobe Illustrator or Adobe Photoshop. Create Character Sequence. Image Size 2600x1950 pixels. Rows 50:Columns 100. Each Cell Size 26x39 pixels. this is a 640 x 480 example of the 2600 x 1950 they show

How To Put 3 Column Guide For Website...
forums.adobe.com
How can i put a 3 column guide in PS like I am building a website? This way I can use each section on its own and know where my boundries are. I guess I could just draw a line, but I want something that I can adjust quickly.

Single Row/column Marquee Tool
www.photoshopgurus.com
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
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

Import/Parse Text File Into Excel Columns Using Command Button &amp; VBA
www.vbcity.com
I am attempting to import and parse a text file into an excel spreadsheet. The user starts the import with a command button. The user can select the file to import and then the information is placed into Excel columns. However, I receive an error message on my QueryTable.Add command. I cannot understand why; the QueryTable.Add command returns a QueryTable, which is the object I am setting it to. The run-time error indicates "Run-time error '13': Type mismatch." The code follows, with the line causing the run-time error in purple:Private Sub btnImportCOA_Click()'Import USPS ACS file    'Variable declaration        'CONSTANTS    Const ForReading = 1 'Open text file as Read Only    Const FirstCol = "D" 'First column available to be used for imported records        Dim FileToOpen 'Name of file to import    Dim ValidFile As Boolean 'Flag indicating if user chose a valid file    Dim fs 'File System Object    Dim ts 'Text Stream Object        Dim strHeader As String 'Header record from import file        Dim FirstRow As Integer 'First row available to be used for imported records        FirstRow = 5                Dim qtCOA As QueryTable 'Query table built from data returned from import file         'Prompt user for choose file to import    FileToOpen = Application.GetOpenFilename(, , "Choose COA file to import...", , False)        'Verify user did not click 'Cancel' button    If FileToOpen = False Then 'user clicked 'Cancel' button        Exit Sub 'no file to process    End If            'Sequential access to import file    Set fs = CreateObject("Scripting.FileSystemObject")    Set ts = fs.OpenTextFile(FileToOpen, ForReading, False)             'Read header record from file    strHeader = ts.ReadLine        'Close file    ts.Close        'Determine first available open cell to append records to end of recordset    While Worksheets("COA").Range(FirstCol & FirstRow).Value <> ""        FirstRow = FirstRow + 1    Wend       'Parse file into records    Set shCOA = Workbooks(1).Worksheets(1)          Set qtCOA = shCOA.QueryTables.Add(Connection:="TEXT;" & FileToOpen, Destination:=shCOA.Cells(FirstCol, FirstRow))        With qtCOA        .TextFileParseType = xlFixedWidth        'Length of each field from import file        .TextFileColumnWidths = Array(1, 8, 7, 16, 6, 1, 1, 3, 47, 1, 28, 60, 35, 1, 28, 60, 43, 66, 2, 4, 8, 1)        'Column data type for each field of import file        .TextFileColumnDataTypes = _            Array(xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, _            xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, _            xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, _            xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat, xlGeneralFormat)        .Refresh    End With

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.

Flex :: Actionscript 3 - Property Like 'visible Columns' In Advance Data Grid
stackoverflow.com
I want to some how control the visibility of some columns in my advance data grid. I have a data provider with 115 coumns out of which I want to hide few columns. I know the column index and header field of these columns. Is there some property in Advance data grid where I can specify this directly?

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

Hyperlink Column In Gridview - Getting Error On Clicking Link
forums.asp.net
I have a site with a functioning database for members displaying location info. One column is shows their web address. When I set this column to be a hyper link column and then go online and click the link, I get an error. It seems that the database thinks this link should point to a page within the site instead of the home page of a completely different web site url. What property do I need to set to get the link to send the visitor to the member web site? I used VWD 2005 to create the site and use SSMS Express for changes on the remote server.

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.

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 :: Resize The Gridview Columns?
forums.asp.net
I m creating my application in ASP.NET 2005 with C# and SQL SERVER 2005. In asp.net standard control i have used the multiline textbox in my application and on the click event the date displays in gridview. I have used the textbox for storing the address which contains the atleast 3-4 lines... <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" autogeneratecolumns="false" AutoGenerateDeleteButton="false" AutoGenerateEditButton="false" DataKeyNames=id> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:boundfield datafield="id" readonly="True" headertext="ID"/> <asp:boundfield datafield="address" headertext="Address"/> </Columns> </asp:GridView> I think the columns of the gridview are not resizable.They are predefined for each column... Now,what i want it to look or display should be as :: ADDRESS Name of apt,soc Opp or near by Area name I want to display the text in the gridview in the same way as above. The values are stored in the database and i get them thru sqldatasource...

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 ?

How To Update Particular Column Values Of Gridview On Specific Dates Using Vb.net
stackoverflow.com
I have column in database ID From To s1from s2to s2price fare 1 Delhi Manali 17-Dec-2010 19-Dec-2010 $900 $600 2 USA Canada 18-Dec-2010 20-Dec-2010 $500 $800 3 Newyork salinas 19-Dec-2010 22-Dec-2010 $760 $1000 I want when any user search For: Delhi to Manali on between 17-Dec-2010 to 19-Dec-2010 then the price would be automatically changes to $900 in gridview else the default price wold be displayed in fare is $600 if he search for DelHi to Manali after 19-Dec-2010. I m confused how to implement this logic ... using vb.net ...

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# - .Net Equivalent Of JSP Page?
stackoverflow.com
What is the .Net equivalent of a JSP page?

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# - 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# - 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# - Paging In Gridview In Webform
stackoverflow.com
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# - 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.

Create 3 Columns Layout With Left Right Column Fixed And Middle Coloum Stretch?
forums.asp.net
i have a master page , i have 3 columns in a row, i have placed the content page in the middle column . and to the right and left columns there r some buttons and images, now I want my right n left columns with a fixed width 160px and the middle column should stretch automatically to fix in to the width of the screen <form id="form1" runat="server" style="width: 100%; height: 600px;"> [Code]....

SQL Server :: Copy Data From Multiple Columns Into One Column?
forums.asp.net
My View has four columns with years, none of the rows have complete yearly data. Current View Columns 1-10, FY, Expr1, Expr2, Expr3 Some data, 2010 NULL,NULL, NULL Some data, NULL, 2010, NULL, NULL Some data, NULL, NULL, 2010, NULL Some data, NULL, 2010, 2010, 2010 Some data, 2010, NULL, 2010, 2010, Some data, NULL, NULL, 2010, NULL Some data, 2010, 2010, NULL, 2010 Some data, NULL, NULL, NULL, 2010 A new column needs to relfect 2010 for each row in the View. Goal New View Columns 1-10, FY_NEW Some data, 2010 Some data, 2010 Some data, 2010, etc. for each row in the view I can not hard code the data as time moves forward next year rows will have 2012, etc. How can I get lthe year, in this case 2010, into a new column regardless of the year?

Forms Data Controls :: How To Select And Pass A Grid Column Value To A Text Box For Other Work
forums.asp.net
i want know, How we can select and pass a grid column value to a text box for other work

Show A Text Value In A Column In Gridview In .net?
stackoverflow.com
I have a GridView to show user detail like name,phone,and status(active,suspend).my problem is that in database the user status in from of integer like 1 for Active and 0 for suspend.now while i am showing data to user in GridView I want to show Active and suspend Text according to status in database 1 or 0. I am not getting where to check for this condition in Asp.Net I am new in asp. I have done it in php also.like if($fetch->user_status==1) echo "Active" else echo "suspend"

Get The Global Width Of A Column-width Layout For A Random Text?
stackoverflow.com
<div id="multiColumn">a random and long text</div> #multiColumn { height: 320px; -webkit-column-width: 200px; -webkit-column-gap: 20px; background: #ccc; } With a random text, how do I get the total width of a multi-column layout? I think I found a solution. However it's not the most elegant... #multiColumn { background: #ccc; width: 200px; } [Code]....