|
i have did that. it works fine when i am working on my machine but it won't work wen i am using remote machine.
|
|
|
|
|
i was trying to write the asp code in asp.net 2.0
the following code.
<% @Language=VBScript%>
<% Option Explicit %>
<%
set objRS=Server.CreateObject("ADODB.Recordset")
objRS.Open objConn
%>
but the set and get keywords ae not supported .
|
|
|
|
|
u want to use property of asp.net.
|
|
|
|
|
In asp.net 2.0 is based on C# language you gotta use properties as shown below :
private my_Name;
string MyName
{
get
{
return my_Name;
}
set
{
my_Name = value;
}
}
hope it helps...
|
|
|
|
|
hi ...
I am writing the code in source file(design).
there i am trying to connect the application with the back end(sqlserver).
|
|
|
|
|
Sonia Gupta wrote:
This doesn't work, you're using ASP.NET, not asp.
If you're using ASP, you're not using ASP.NET, and you're in the wrong forum. This sure is bringing back bad memories of asp, what makes you think you're using ASP.NET 2.0 ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi
i want generate gridview programmatically to but having a error in
hyp1.DataNavigateUrlFields = "link";
ERROR:- cannot implicitly convert type 'string' to 'string[]'
plzzzz help me
thanks in advance
DataTable dt = new DataTable("dtable");
DataRow dr1;
DataRow dr2;
dt.Columns.Add(new DataColumn("Text", typeof(string)));
dt.Columns.Add(new DataColumn("link", typeof(string)));
dr1 = dt.NewRow();
dr1[0] = "Yahoo";
dr1[1] = "http://www.yahoo.com";
dt.Rows.Add(dr1);
dr2 = dt.NewRow();
dr2[0] = "Google";
dr2[1] = "http://www.google.com";
dt.Rows.Add(dr2);
GridView GV = new GridView();
GV.AutoGenerateColumns = false;
HyperLinkField hyp1 = new HyperLinkField();
hyp1.HeaderText = "UsefulLinks";
hyp1.DataTextField = "Text";
hyp1.DataNavigateUrlFields = "link";
hyp1.Target = "_blank";
GV.Columns.Add(hyp1);
GV.DataSource = dt;
GV.DataBind();
plhPlaceHolder.Controls.Add(GV);
|
|
|
|
|
It is expecting a string array. So you need some code like this:
string[] tmp = new string[1] {"link"};
hyp1.DataNavigateUrlFields = tmp;
Hope that helps.
Ben
|
|
|
|
|
i m using datatable field to bind link to that field
how to convert that field in a string array
|
|
|
|
|
Isn't the field just called "link"? I am not sure what your issue is? You tried the code I posted and it didn't work? What error did you get?
Ben
|
|
|
|
|
i m try to generate gridview programmatically and want to bind data from database, BUT first i create a datatable n try to bind it with gridview.
the method u suggest (string[] tmp = new string[1] {"link"}; ) in not properly working in this code
at line no.8 and 12, i specify that link which is bind with field (hyp1.DataNavigateUrlFields = "link";) so that when i click on the link it open that site.
when i try to run the application i got error msg :- cannot implicitly convert type 'string' to 'string[]'
1 DataTable dt = new DataTable("dtable");
2 DataRow dr1;
3 DataRow dr2;
4 dt.Columns.Add(new DataColumn("Text", typeof(string)));
5 dt.Columns.Add(new DataColumn("link", typeof(string)));
6 dr1 = dt.NewRow();
7 dr1[0] = "Yahoo";
8 dr1[1] = "http://www.yahoo.com";
9 dt.Rows.Add(dr1);
10 dr2 = dt.NewRow();
11 dr2[0] = "Google";
12 dr2[1] = "http://www.google.com";
13 dt.Rows.Add(dr2);
14 GridView GV = new GridView();
15 GV.AutoGenerateColumns = false;
16 HyperLinkField hyp1 = new HyperLinkField();
17 hyp1.HeaderText = "UsefulLinks";
18 hyp1.DataTextField = "Text";
19 hyp1.DataNavigateUrlFields = "link";
20 hyp1.Target = "_blank";
21 GV.Columns.Add(hyp1);
22 GV.DataSource = dt;
23 GV.DataBind();
24 plhPlaceHolder.Controls.Add(GV);
|
|
|
|
|
So when you replace line 19 with
string[] tmp = new string[1] {"link"};
hyp1.DataNavigateUrlFields = tmp;
What error do you get?
Ben
|
|
|
|
|
Thank u Very much
now it is working fine with some little change
u really help me a lot in my code
thanks a lot buddy
|
|
|
|
|
i have data " Employes data Entery Form "
i have used table, textbox to desing form
i used Employe's data Entery Form but while displaying it shows (alignment is left)
Employes
data
Entery
Form
will not appear in same row eventhough there exists sufficient spaces.
Thank you
vijaya
|
|
|
|
|
use width=100% can solve your problem.
Devjit
|
|
|
|
|
remove colspan="4" and orelse keep align to center
|
|
|
|
|
use width=auto trust me it is working
|
|
|
|
|
Why Remove, RemoveAt of datable columns function?
when i removed certain column by name it removes data of other columns?
thank you
vijaya
|
|
|
|
|
by remove u r providing the name of datacolumn which could be possible to find or match any other column . But removeat u just provide the index number of the datatable column and get deleted. so no any possibility to find another column.
Devjit
|
|
|
|
|
well it is so interesting try to use index number and dont forget index numbers start at 0
|
|
|
|
|
Hi all,
Is there is any way to add header (not cell header) before cells headers in a GridView after each 10 Records. so that in printing each 10 Records have a heading.
Please guide me thanks
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
you can use headertemplate under template property in gridview..
Keep coding
|
|
|
|
|
Thanks Atarikg
But I have mentioned in first mail that I am talking about GirdView's header not Its cell's individual headerText.
And also How to insert that Header after Each 10 Records.
Any hint is thanksful
Bye
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
hi,
how to develop job portal search using search engine
|
|
|
|
|
1. The title of your post tells us nothing about what you want help with.
2. Your topic is too broad. We aren't here to write applications for you.
3. You and this guy[^] should really get together.
|
|
|
|