Hi all,
I need some help on retrive the value from query string.
I have two web forms. One has the datagridview which displays the data from database. On one of the column I made a hyperlink to go to next page
like, qi.aspx?qi_track={0} and now I need to open a detail of this qi_track on second page.
how can I extract the value of qitrack from the url.
and my second problem is:
I want to make my column value a hyperlink in datagrid view.
How can I make that happen.
for ex,
NAME
_______
A.J.
T.J
ETC.
value under name cloumn comes from database and I want a hyperlink under A.J., T.J. etc to open a new page.
Thank you in advanced for your help.
Thanks,
10 1744
In VB.Net
Request.Querystring("qi_track"), this return value for qi_track
In c#
Request.Querystring["qi_track"], this return value for qi_track
Thanks kunal.
But I still have another problem which about making a hyper link on one of the column's datavalue.
like,
name is the column name which holds people's name I need a hyperlink on each of this name to pull up their detail.
how can I do this?
Thanks,
Thanks kunal.
But I still have another problem which about making a hyper link on one of the column's datavalue.
like,
name is the column name which holds people's name I need a hyperlink on each of this name to pull up their detail.
how can I do this?
Thanks,
After you have the data in the gridview, you can do post proccess on it.
Changing what is in it's rows/columns at will.
Hi Plater,
Can you explain with example if possible?
I am still new to asp.net.
Thank you,
Hi Plater,
Can you explain with example if possible?
I am still new to asp.net.
Thank you,
Well here's a snipit from one of mine that changes a column to a hyperlink. You should be able to get an idea from it.
gvOverdueSites is the name of my gridview. -
protected void procOverdueSites()
-
{
-
string msg = "";
-
string href = "ManagerSiteInfo.aspx?siteid=";
-
if (gvOverdueSites.HeaderRow != null)
-
{
-
for (int i = 0; i < gvOverdueSites.Rows.Count; i++)
-
{
-
msg = gvOverdueSites.Rows[i].Cells[0].Text;
-
if (gvOverdueSites.HeaderRow.Cells[0].Text == "SiteID")
-
{
-
HyperLink hl = new HyperLink();
-
hl.Text = msg;
-
hl.NavigateUrl = href + msg.Replace("&", "&");
-
gvOverdueSites.Rows[i].Cells[0].Controls.Add(hl);
-
}
-
}//end of forloop
-
}
-
}
-
Thanks Plater,
I will try.
Also, is might be a very silly question but I don't seem to figure it out.
I need to extract a last two character of a string matching "99".
My string can be a variable length so I think I can not use substring function.
How can I accomplish this?
Thanks,
Sorry but let me redefine my last problem.
I have string of unknown length but all these string will have initial value of current date. - for example, string str1 = 0801hello,
-
str2 = 0801why
-
etc. I need to extract only the character after the date.
-
I save the current date in a variable.
-
-
sqidate = DateTime.Now.ToString("yyMM");
-
but now I am not sure how to match up the string with date varible("sqidate") and extract only the reset of the value.
Please help me.
Thank You,
if it's always 4digits for the date, just take a .SubString(4); this will skip the first 4 characters and take everything after it.
I recently find out that the data store in database removes the first zero from the value. - like for 2008 value is store like 801aaa, 801bbbb ect.
-
and it will be for 2010, 1001aaa,1002bbb etc.
-
so substring (4) would work for 2010 but what about 2008.
I like to do it in a way so that it will take care of all years like 2008,2009, 2010 and so on.
any suggestion?
Thank You,
I'm not sure I have you statements right.
I though you were using "yyMM" for your datestring, that is always 4digits.
If that is what is going to start every string, then all you have to do is skip 4digits.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bruno Alexandre |
last post by:
Hi guys,
withou using SP, I want to be able to add a Parameter to the SQL Query and
retrive the Recordset so I can use the Paging property under the recorset
object.... how can I do this?
I'm...
|
by: Goran |
last post by:
I'm a student and I've just started to learn Visual Studio.NET. I have
a project to make a web application.
I have a problem to connect to the database and retriving the PassType
of the...
|
by: partha das |
last post by:
sir
i need a single sql query it may be sub query need to retrive the 5th highest salary from a employee table
|
by: asenthil |
last post by:
Hai,
i'm having a string in a specific field of a database...
now i want to retrive that string from the database
and i have to write that string into a xml file....
retriving is not a...
|
by: weiwei |
last post by:
Hi
here is my scenario, I create a drop down list in itemtemplate.(that
drop down is created from db), after user
click edit command, my ideal plan is have another drop down list in...
|
by: varaprasad204 |
last post by:
hai all...,
i used to store my mp3 file into database by
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<%@ import Namespace="System.IO" %>
<%@...
|
by: idsanjeev |
last post by:
hello
i wants to retrive data in textarea like input text but in textarea value is not work so what should be use to retrive textarea value after any error
<input type="text" name="name"...
|
by: amritranjan |
last post by:
How to retrive image file from MS access database and display this in another JSPpage
--------------------------------------------------------------------------------
This is my Jsp code for...
|
by: ganesh22 |
last post by:
Hi,
Here the below code is for dynamically creating textboxs, its creating fine but after user enters some values in textboxs how can i retrive that values?
using System;
using System.Data;...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |