Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










C# - Extracting String Data - From The Right-hand Side?


In my code I will be presented with url strings to pages... All I want to do is to extract the page name, nothing else... (Example)

string page1 = "./default.aspx";
string page2 = "./subfolder/gallery.aspx";
string page3 = "./subfolder/anotherSubfolder/demo.aspx";

I've used the substring feature before, but I am struggling with this one since I only want the page names which are on the right hand side, I basically want to chop of everything else (folder paths).. all I want to end up with is default.aspx, gallery.aspx and demo.aspx


View 4 Replies (Posted: Jan 8 10 at 12:15)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Unitended Reference Comparision / Get A Value Comparison, Cast The Left Hand Side To Type 'string'?
I am getting this warning:Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'I tried this:

if (Convert.ToString(Session["message"]) == SESSIONTIMEOUT)
or
if (Session["message"].ToString() == SESSIONTIMEOUT)

But I'm still getting the above message.

Posted: Mar 23 at 18:37

View 1 Replies!   View Related
Forms Data Controls :: Displaying Text On The Right Hand Side Of A Column Name?
I needed to display data from a table in this style:

Hotel: hotel1 Destination: United States

From: UK

Hotel:hotel2Destination: United States

From: UK

Hotel:hotel3 Destination: United States

From: UK

This would all go in a box or table, the bold text is the column names from the table, but id be quite Happy to just have them as text and not display the coloumn headers. whats the best control to display data in this way, ive messing about with different controls but cant get this layout

Posted: Jan 08, 2010 01:27 PM

View 3 Replies!   View Related
C# - Best Option For Extracting String Data?
I have a Portable Bridge Notation formatted-file that I have to work with. I have already a few simple examples working by using indexing and substrings extracting what I need and I suppose for this PBN business it would suite me well since it isn't run too often. If I one the other hand would run that code like all the time (thinking of working with vCards) then I am worried about memory usage under high workload because of the high amout of temporary string variables created from all substrings and splits.

There are two other options available that I know of. Regex and StringReader / TextReader and I wanted some general opinion on what to use.

Intended usage is to extract to objects and serialize to json so that I can more easily work with or persist this information. Hell if it's fast enough I might even do it on the fly.

Posted: Mar 6 10 at 8:53

View 1 Replies!   View Related
Forms Data Controls :: DataList Extracting Extracting And Adding Value To Labels In Template?
I have a datalist that is populatedvia and SqlDataSource. Code is VB

I am trying to extract two Values from theItem Templete and add them together. Then I want to add a new Label to the item template with the sum of the two added values.

I am able to to this using a GridView but no success with the datalist

My form code:

<asp:Label
ID="SDLabel"
runat="server"
Text='<%# Eval("SD") %>'></asp:Label><br
/>
SDT<asp:Label
ID="SDTLabel"
runat="server"
Text='<%# Eval("SDT") %>'></asp:Label><br
/>
SDS:<asp:Label
ID="SDSLabel"
runat="server"></asp:Label><br
/>

My VB Code behind Starts out:

[Code]....

Posted: Nov 06, 2010 09:36 PM

View 7 Replies!   View Related
The Left Hand Side Of An Assignment Must Be A Variable?
I have a custom user control I created and I'm trying to open up the controls inside of it to the parent aspx page that it will reside in. I have a radio button so I created a public property like so:

[Code]....

Now when I try this, the get works fine, however the set errors out saying:

The left-hand side of an assignment must be a variable, property or indexer

I've tried everything including casting but it won't work. The Value of the radios are all integers and will be stored in my db as integers.

Posted: Apr 17, 2009 01:48 AM

View 3 Replies!   View Related
Web Forms :: How To Move Text To The Right Hand Side
I have designed a webpage where my text is shown on the left hand side of my webpage so I want to change it to right side of the page.I am using asp classic.

Posted: Nov 11, 2009 02:15 PM

View 8 Replies!   View Related
Forms Data Controls :: Extracting 3 Characters From Just Complete String?
I m using hyperlink inside gridview. Here is my aspx code-

[Code]....

In the above code i just want to extract first three characters of sam_url in text property of hyperlink.

How can i get this using eval()?

Posted: Dec 09, 2010 08:31 AM

View 4 Replies!   View Related
AJAX :: Popup Message At The Right Hand Bottom Side?
How can I add a message popup at the right hand bottom side, just like outlook email received message alert??

IsajaxToolkit: ModalPopupExtender??

Posted: Nov 13, 2009 12:33 AM

View 2 Replies!   View Related
C# - Extracting Paragraph Using Search String?
i am using the below code for extracting paragraph for matching string.

[code]...

i am getting correct result,but i am getting breakable words in starting and ending paragraphs like "...ing regions uses the and Boolean connector to specify the region so narr..."

Posted: Apr 1 at 8:00

View 2 Replies!   View Related
Web Forms :: All Data Results To A String Side By Side?
I have some sql records, table has 3 columns as userID, name, city. I want to take the records with ; select name, city from where city='New York' it turns 5 or 6 records. I want to add them to a string side by side like string record="michael NewYork, marshall New York, liz New York, Forest New York";

How can do I take it ?

Posted: Jan 25, 2010 08:59 AM

View 6 Replies!   View Related
Forms Data Controls :: Gridview Has Bar Cursor Not Hand?
I have a gridview that has LinkButtons and when I hover over the link instead of seeing an hand cursor, that allows me to click the link, I see a vertical bar, that's not clickable. This was working normally until recently, so I must have done something to cause it, but I don't know what?

Posted: Jun 01, 2010 02:55 PM

View 2 Replies!   View Related
Extracting Data From A Webpage?
I have a VB.net application that im developing which im trying to have extract some text from a website and either save it to a .txt file or update my database. I am a beginner so i have no idea how to go about doing this. The website is [URL]. one of the problems im having right now is that this website has been down a lot lately. there is another website that i could pull the data from but it requires more than one page to get all the data. If i could either get this data to the database or to a txt file i could work with it from there. I posted in the vb.net forums but someone redirected me here to ask this question.

Posted: Nov 25, 2009 02:13 AM

View 1 Replies!   View Related
Extracting Data From Dynamic Array In C#?
I am having a little difficulty taking the values from a dynamic array intofixed variables.WhatI am doing is this:

text is pasted into a textbox on a web form, we don't know how many lines this text will consist of soa dynamic array is used to collect the data. I would like to take the array data and set them to fixed variables within the script but i would likethe array loop to create the variables dependant on how many lines the textbox conatins. eg text1, text2, text3and so on. Is there a way to create a loop that will create unique variables and set them to theposition value of the array until it reaches the end of the array collection for use further on in the script?

Posted: Nov 18, 2009 05:28 PM

View 5 Replies!   View Related
Extracting Data From A SpGridView Selected Row?
Using SPGridView, I want to fill textboxes with the SPGridview Selected Row Data on a button click event.

txtCode= SPGridView.SelectedRow.Cell[1].Text;

On debugging, it shows Cell[1] is empty but it is showing data in the Grid.How can this be achieved?

Posted: Apr 16 10 at 13:18

View 1 Replies!   View Related
C# - Extracting Data From An ASPX Page?
The task is: given a web application that returns a table with pagination, do a software that "reads and parses it" since there is nothing like a webservice that provides the raw data. It's like a "spider" or a "crawler" application to steal data that is not meant to be accessed programmatically.

Now the thing: the application is made with standart aspx webform engine, so nothing like standard URLs or posts, but the dreadful postback engine crowded with javascript and non accessible html. The pagination links call the infamous javascript:__doPostBack(param, param) so I think it wouldn't even work if I try even to simulate clicks on those links.

There are also inputs to filter the results and they are also part of the postback mechanism, so I can't simulate a regular post to get the results.

I was forced to do something like this in the past, but it was on a standard-like website with parameters in the querystring like pagesize and pagenumber so I was able to sort it out.

Anyone has a vague idea if this is doable, or if I should tell to my boss to quit asking me to do this retarded stuff?

EDIT: maybe I was a bit unclear about what I have to achieve. I have to parse, extract and convert that data in another format - let's say excel - and not just read it. And this stuff must be automated without user input. I don't think Selenium would cut it.

EDIT: I just blogged about this situation. If anyone is interested can check my post at [URL] and comment about that.

Posted: Sep 14 10 at 13:10

View 4 Replies!   View Related
Reading Text File And Extracting Data?
i have txt files(many) and i need to extract data from it..

like

emailsand urls

how do i do it? i need to code for this work...

Posted: Sep 24, 2009 04:18 PM

View 7 Replies!   View Related
Forms Data Controls :: Extracting Data In Formview Using Databound Event?
I am trying to access formview by using databount event but it doesnt work because it only works on the detailsview. Does anyone have a solution for this in the same format?

C# code:

[Code]....

Posted: Nov 23, 2009 11:56 AM

View 4 Replies!   View Related
Forms Data Controls :: Extracting Data From Gridview And Insert Into Database?
i'm currently doing ashopping website. The customer will have to selected the item they want to buy and it will appear in thedetail view when they click add in the grid view. I need the info inside the detail view to be insert into a database call Orderlist.

i've try using INSERT INTO OrderList (ProductName, Price,) VALUES (@ProductName, @Price) but it don't seems to work.

Was it because i can't insert it like this as it is detailview? This method can work if is Textbox instead of detailview.

Posted: Nov 16, 2010 08:13 AM

View 5 Replies!   View Related
Forms Data Controls :: Extracting Data From Gridview And Insert Into Sql Database?
i have a gridview of 8 columns.I need to extract the data row by row from the the first(Message) and the last(phone_no) column and to be inserted into my sql table named massMessage.I have the codes here. Apparently im able to only extract the phone_no. My message wasnt inserted.

protected void btnSave_Click(object sender, EventArgs e)
{
foreach (GridViewRow gvr in GridView2.Rows) //loop through GridView

[code]...

Posted: Mar 30, 2011 02:50 AM

View 2 Replies!   View Related
ADO.NET :: Error While Extracting The Data From Table From Database Called Train?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Test1._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >[code].....

I had created the database called train. A train database has a two tables

Posted: Jan 12, 2011 09:35 AM

View 3 Replies!   View Related
Forms Data Controls :: Extracting Price From DataView Or From The Database?
Currently I am developing an ecommerce web site where

1. I choose the Product from a GridView (by pressing Select)

2. This product gets added to a DataView

The problem arises because I have a quantity textbox and wish to multiply the price by the quantity textbox.

How can I extract the price from the gridview to multiply it ? (and then subsequently display it in a label)

Posted: May 11, 2010 04:10 PM

View 7 Replies!   View Related
Forms Data Controls :: Extracting Gridview To Excel Using Response Class?
Im writing a bit of code that will extract the contents of a gridview to excel. I have all the parts working except for one. In my page_load i fetch the data from the database and then have the user select some options which filters the data and then the gridview gets populated. The problem im having is that the Response call doesnt seem to get the data from the gridview if i enclose the database fetch command within if not page.ispostback in the page_load

I have some test pages where i just fetched the data from the database bound it in a gridview in the Page_load. then on a button click export the data in the gridview to excel. Works fine if i DONT enclose the fetch command within not page.ispostback but outputs an empty excel file if i do.

Now i have to use not page.ispostback in the actual webpages because the users have to make selections which will filter the original dataset. How do i get this to work?

The page is also implementing AJAX if that helps. Here's an example of what i have:

[Code]....

Posted: Mar 31, 2011 03:32 PM

View 1 Replies!   View Related
Forms Data Controls :: DataGrid - Extracting Results And Hiding Rows?
I have a dataGrid with ButtonColumns in my asp pageand I would like to do the following to:

When a row is clicked, I want to be able to:

1 - Hide all rows and display only the clicked row dynamically/on the fly.

trying to loop thru the datagrid and display only the Row index passed by the OnITemComman - but unsure of how to do it.

2 - Extract the row values (all cells in the row) to use as parametersin a query.

Used many ways of many examples but i always get a blank value. Managed to get the button text in the class but i need the full row values not just the cell clicked.

Posted: Jan 14, 2010 06:16 AM

View 1 Replies!   View Related
Forms Data Controls :: Extracting Edited Values From GridView, To Update/insert To Database?
I'm coding my first VB web application, which allows a user to input an order number and pull up invoice and shipping data linkd to that order number.

I have the first bit down and working, where the existing data in the database is displayed in the GridViews. One of the GridViews is set up to allow data editing, and I have syntax set to make the row editable, but I'm struggling with getting the "Update" link/functionality to work. I want to assign the values in each cell to an object (ie. 'dgInvNumber' for Invoice Number), but everything I've tried (been doing a ton of Google searching for help, but no luck yet) keeps giving me an "Object reference not set
to an instance of an object" error when I click the Update link for the row of data being edited.

At this point, I don't know what syntax to use to get the edited values out of the GridView row and assigned to objects for each cell (I have a total of 10 cells that can be edited in a row).

For background info, the GridView is set up with Bound Fields. I'm using Visual Studio 2005. Alot of places I've looked talk about TextBox controls and using FindControl. Also seen some places talk about DataBoundLiteral Controls. I tried the latter with no luck (still getting error). For TextBox controls, I don't understand how to use that part, since it mentions referencing the TextBox controls declared in the EditItemTemplates of the TemplateField column fields in the GridView control. But I didn't set up anything in the EditItemTemplates (that I know of).

Posted: Jul 28, 2010 02:50 PM

View 1 Replies!   View Related
Forms Data Controls :: C# Extracting Values From Gridview Columns Using Template Image Button?
I have a issue were I cannot extract values from column cells using the image button event that is in a template column with the gridview.

The code is below:

[code]....

Posted: Sep 25, 2009 11:09 PM

View 12 Replies!   View Related
Net Is The ASP.NET Web.config File Getting Out Of Hand?
Do you struggle with the size and the number of entries in the web.config file? Do you understand every element?Is it time for Microsoft to relook at how an ASP.NET site is configured, perhaps by splitting the web.config file into multiple files?

Posted: Apr 8 10 at 13:56

View 2 Replies!   View Related
Search String From Right Side?
I am willing to search string from right side?

Example:

[code]...

I am willing to remove string "This is world" means till point(".").

How to do it?

Posted: Jan 21, 2009 02:18 PM

View 4 Replies!   View Related
MVC :: Short Hand Name Attribute For Controller?
I noticed the ActionNameAttribute lets you alias your controller methods. This is nice but I was curious if there was a comparable attribute for a controller name. Specifically, I have a controller with a lengthy name in c# world but would like to shorten / alias it in the actual URL. I was hoping for some kind of controllername attribute. Is there such a beast?

Posted: Feb 01, 2010 04:57 PM

View 3 Replies!   View Related
C# - How To Get The Standard Hand Cursor To Appear Over The Accordion
What property do I need to set here ?

<cc1:Accordion ID="Accordion1" runat="server" FadeTransitions="true" AutoSize="Fill"
SelectedIndex="0" RequireOpenedPane="false" DataSourceID="objQues" TransitionDuration="250">
<HeaderTemplate>

I tried this..not working:-

<script type="text/javascript">
function fnover(id)
{
document.getElementById("Accordion1").style.cursor = "pointer";
}
</script>

Posted: Dec 16 10 at 6:44

View 1 Replies!   View Related
Hand Over Variables To A Website Without A Querystring?
I have a web-application (ASP.NET) and want to open another external webpage on another machine. I have to forward some information (variables) to that webpage, but they should not be part of the URL. So my question is, how can I achieve this without querystrings?

Posted: Aug 16 10 at 8:07

View 1 Replies!   View Related
Get Some First Hand Accounts Regarding Reporting Toos That Have Used?
This week my team spent way too much time trying to do simple things in reporting services, and I've decided to start evaluating other options. I know there are some good options out there now that aren't too expensive. I've heard that Telerik, ActiveReports, and a few others are widely used.I was hoping to get some first hand accounts regarding reporting toos that you've used. Specifically, I definitely want to hear your thoughts about:Pain points and gotchas you ran into.Ease of use for report design. It's a little bizarre to me that Access still seems to hold the throne in this area!

Posted: May 13 10 at 0:09

View 2 Replies!   View Related
Change Pointer On Mouseover To Hand In Chart
i am using Asp.net Chart and showing bar chart. i used dataPoint.MapAreaAttributes to call a JS func(which retrieves the ID) to show next chart on click of a particular bar in the existing chart. but i am unable show hand pointer on mouse over the particular bar on the chart. And when i use Datapoint.Url which is changing the mouse pointer to hand on mouseover the bar but i am unable to call the JS func. how to show Hand pointer on mouseover of a particular bar?

Posted: Aug 23 10 at 6:01

View 1 Replies!   View Related
Forms Data Controls :: Equivalent Of A 2 Page GridView Side By Side?
I have a results set of3 columns and aproximately40 records. Instead of a Gridview with paging enabled or a GridView to where you need to scroll down the page to view all the data, I'd like to havetwo tables side by side.Is there and easy way to acomplish this?

Posted: Feb 01, 2011 01:46 PM

View 1 Replies!   View Related
Forms Data Controls :: Display Divs Side By Side In A ListView?
I'm trying to customize a ListView control to display like a GridView so that I can enable users to see and update multiple database records at a time.

In the ItemTemplate I've encased all the fields in divs with a style class that would give each div a set-width and left & right borders so that all fields would lineup like a column, however the divs display underneath each other rather than side by side. I tried nesting all the "field divs" in a <p></p> but this doesn't work.

I've spent much time Googling my question and haven't been able to find a clear answer. I'm teaching myself ASP.Net on my own with books and online tutorials and these materials have not shed much light on this particular issue either as of yet.

My Code Example:

[Code]....

Posted: Jan 23, 2010 12:01 AM

View 5 Replies!   View Related
Make Mouse Pointer Become Hand To Click Button
<td id="btnIcOld" style="text-align:center;">
<img src="<%= VirtualPathUtility.ToAbsolute("~/img/chic/Load.png")%>" />
</td>
[code]....

the image is my button, and that is the JQuery that handles the button click. when you hover your mouse over the image, it stays as the basic arrow pointer. How do I make it change to a hand so the user knows they can click on it?

Posted: Jan 7 at 16:52

View 4 Replies!   View Related
Mvc2 Data Annotations Validation (Client Side Works, Server Side Doesnt?
I'm using an entity model with metadata annotations. My controller method looks like this...

if (!ModelState.IsValid)
{
return View(model);
}
else
{
UpdateModel(model);
repo.Save();
return RedirectToAction("Index");
}

If I enable client side validation in the view I'll get the error per the Attributes from the metadata class. If I take clientside validation out, error gets thrown from saving to the DB rather than return the view with an Error Summary.

This is the top portion of my view....

<% using (Html.BeginForm())
{%>
<%: Html.ValidationSummary(true) %>

I've tried running without debugging (ctrl + f5) in debug and release mode as well as setting breakpoints and Debugging (f5) but it just seems weird to get Client side validation without server side validation. What am I missing here?

Posted: Aug 12 10 at 23:12

View 1 Replies!   View Related
Forms Data Controls :: Client Side Code To Pass Values To Server Side Variable?
I have ListBox_SelectedTextChanged() method that creates another list box in the runtime as follows:

// Get Action Level List
lbxActionLevel = new
ListBox();lbxActionLevel.ID =
"ddlA" + i.ToString();
lbxActionLevel.Width = 100;
lbxActionLevel.Rows = 2;
SqlDataReader dr =
new BusinessLogicLayer().bllGetActionLevels();
lbxActionLevel.Items.Clear();
while (dr.Read())
{
ListItem lAction =
new ListItem();
lAction.Text = dr.GetString(1).Trim();
lAction.Value = Convert.ToString(dr.GetInt32(0));
lbxActionLevel.Items.Add(lAction);
lbxActionLevel.SelectedIndex = 0;
}

I guess because this lbxActionLevel object is generated on the fly, I can't get the selection values once I click the "Done" button. I don't want the lbxActionLevel to do autopostback bacause for some reason most of the user input gets wiped out. Is there a way to get the user selection collected on the client side (javascript) and pass it to the C# code?

Posted: Mar 13, 2008 04:57 PM

View 7 Replies!   View Related
Forms Data Controls :: How To Find Control In Datalist Such As Label By Server Side And Client Side
i have datalist filled by datareader,and i want to make some action based on label text, i want to find the label that contain special value ( for example hide label that text is greaso)

how??

and also how i can find this label by javascript?

Posted: Dec 05, 2009 09:39 PM

View 2 Replies!   View Related
Good Way To Split Data Into Two Side-by-side HTML Tables?
Basically, given data like this:

Col 1 | Col 2
1 7
2 8
3 9
4 10
5 11
6 12

I want to have the page display something like this:

Col 1 | Col 2 Col 1 | Col 2
1 7 4 10
2 8 5 11
3 9 6 12

The purpose of course is that I have extra horizontal space with less vertical space. Obviously it doesn't take a rocket scientist to pull this off, but I feel like I might be missing a cleaner/easier solution than my own, perhaps using CSS or clever use of an existing ASP.NET control. It seems like a common enough requirement, but I can't quite get the search terms right to find what I'm looking for.

Posted: Jul 28 10 at 14:58

View 1 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved