|
yes, intellisense does not work for classic asp in VS 2008. hope VS 2008 SP1 wil do the work,tryin 4 same
|
|
|
|
|
|
Hi
I´m trying to retrieve a value from an specific cell on a DetailsView grid and display it into a TextBox.
I´m using something like
TextBox1.Text=DetailsView.Row(1).Cell(1).Text
but when I run the page, the value is not displayed.
Any ideas??
Thanks
|
|
|
|
|
hi
your code is correct and i tried it under a button,the page runs without errors.
tell me where you put your code? if you put it in load event,take care
because you will have an error if the detailsview isn't filled in load event.
try your code in button click event.
thanks
Essam Moustafa
|
|
|
|
|
I need it to ve retrieved when another control (A DropDownList) is executed...it is:
1) Element from DropDownList is selected
2) Then DetailsView displays something related to the element above
3) Then DetialsView value in Row(1) Cell(1) is displayed in TextBox
|
|
|
|
|
hi
after you fill your control as(listbox)
you put this code in
ListBox1_SelectedIndexChanged
sqlconnection cn=new sqlconnection();
cn.ConnectionString = conString;
SqlCommand cmd1 = new SqlCommand("select * from myTable where ID="+ListBox1.SelectedValue.ToString(), cn);
SqlDataAdapter ad = new SqlDataAdapter(cmd1);
dataset ds=new dataset();
ad.Fill(ds, "v");
DetailsView1.DataSource = ds.Tables["v"];
DetailsView1.DataBind();
TextBox1.Text = DetailsView2.Rows[1].Cells[1].Text;
you can replace listbox with dropdownlist
your brother
Essam Moustafa
|
|
|
|
|
This is not longer workin =(
Maybe I need to declare a library or something, somehow???
|
|
|
|
|
the thing is that DetailsView control does not executes AutoPostBack, so the value in it is never passed to the TextBox ...??
|
|
|
|
|
hi my brother
the code that i wrote is in c# you can convert it in vb.net easily.
you don't need that the detailsview is postback or not because the code that i wrote
can be implemented in ListBox Or DropDownList_SelectedIndexChanged Event
if you try my code your problem will be solved.
Essam Moustfa
|
|
|
|
|
I have two instance name for SqlServer.
I write this code :
SqlDataSourceEnumerator sqlserver = SqlDataSourceEnumerator.Instance;
DataTable dt = sqlserver.GetDataSources();
GridView1.DataSource = dt;
GridView1.DataBind();
but when i run it , i couldn't see the result! What Should i Do?
[]D @ []v[] []D @ []v[]
modified on Thursday, May 7, 2009 8:23 PM
|
|
|
|
|
pampam110 wrote: but when i run it , i couldn't see the result! What Should i Do?
Did you debug your code? What dt returns ?
|
|
|
|
|
thanks for reply
i named my datatable as dt, and put all sqlserver instance name in that.
and then try to fill it in gridview!
yeah, i debug it! but it didn't show any result.
any idea?
[]D @ []v[] []D @ []v[]
|
|
|
|
|
I had a working ASP.NET 3.5 project, and I wanted to move the project files from a network drive to my C drive. I deleted the .sln file, copied the pages, codebehinds, and classes to my C: drive, created a new project in VS2008, and added the files to it. Now when building I get errors on about 10 out of 31 pages: "Could not load type 'pagename'". And that's the only errors shown. Googling, I have seen numerous references to the codebehind not being referenced by the page, but I have checked and they are all correct. I don't know what code to upload to better describe my problem. Any ideas on what I should do next?
My other signature is witty and insightful.
|
|
|
|
|
Is it looking in the old location for the files ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
How can I tell? I started with an empty project, moved the files to the new directory on C, then added existing item for each one. So I would think it is looking in the new location. Plus, the new project doesn't "know" about the old location since it was empty of files.
My other signature is witty and insightful.
|
|
|
|
|
If you created a newly empty project? That maybe causes the error. I suggest you create a normal project including default files like default.aspx etc. And then delete these default files and copy your files to the new project.
Generally, the path of source codes is stored in the .sln file. You can open it with NotePad to check it.
Welcome to www.softwaretree.net!
This website is generated completely by static html pages transforming technology.
You can find many excellent audio/video tools there!
|
|
|
|
|
Perry Holman wrote: I suggest you create a normal project including default files like default.aspx etc. And then delete these default files and copy your files to the new project.
I thought that's pretty much what I did. But instead of deleting the files, I copied the original source for default.aspx, web.config, and global.asax to the files created by the new project. Then I copied each file in with "add new item". And I just now looked at the .sln and everything that seems to reference a path has a reasonable directory path in it, like so:
Debug.AspNetCompiler.VirtualPath = "/ProfRev"
Debug.AspNetCompiler.PhysicalPath = "..\ProfRev\"
But it sounds like it's time to start over, because maybe I zigged when I should have zagged. New project, copy in default.aspx, etc.; then add one file, build the page, add another file, build the page, repeat for 31 pages. Sounds like a fun thing to do on a Friday, huh?
My other signature is witty and insightful.
|
|
|
|
|
Within a stylesheet I copied to an ASP.NET project, the compiler does not seem to like the first line in the stylesheet.
Any idea why?
@charset "UTF-8";
@import url("reset-min.css");
body{
font: 62.5%/2.2em "Lucida Grande", Tahoma, Verdana, Arial, Helvetica, sans-serif;
color: #4b4942;
background: #fff;
}
...
Jon
|
|
|
|
|
jon_80 wrote: Within a stylesheet I copied to an ASP.NET project, the compiler does not seem to like the first line in the stylesheet.
How did you placed the stylesheet? Where did you placed it? Did you deployed the application in IIS?
|
|
|
|
|
I copied the stylesheet over from a template, and, I plan to use it as a Masterpage on my website. The application is deployed within the local IIS for now.
Jon
|
|
|
|
|
I am using the following code to populate a GridView in
protected void Button1_Click(object sender, EventArgs e)
{
String selectCommand = "select top 1000 claimid, formtype, status, totalpaid, paiddate from claim";
SqlDataAdapter ad = new SqlDataAdapter(selectCommand, SqlDataSource1.ConnectionString);
DataTable dt = new DataTable();
ad.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
This works, but I have AllowPaging = true, and the first time I click the "Next Page" button, I get a "PageIndexChanging not handled" exception. I have not setup a PageIndexChanging handler, but I didn't think I had to in this case.
BTW, when I populate by just setting the GridView1.DataSourceID to a SQLDataSource, the problem does not occur. Paging works fine.
What am I doing wrong? Thanks! Mark
|
|
|
|
|
Hi try this in your pageindexchanging event
gridview.pageindex = e.newpageindex
String selectCommand = "select top 1000 claimid, formtype, status, totalpaid, paiddate from claim";
SqlDataAdapter ad = new SqlDataAdapter(selectCommand, SqlDataSource1.ConnectionString);
DataTable dt = new DataTable();
ad.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
Hope this one can help.
Thanks
Hi, Please select Good Question if my answer are fit to your Question.
|
|
|
|
|
You are binding the DataSource manually, so in this case you have to override the PageIndexChanging and PageIndexChanged handler. For example,
protected void GridViewXXX_PageIndexChanged(object sender, EventArgs e)
{
this.SqlDataSourceXXX.SelectCommand = "XXX";
}
protected void GridViewXXX_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridViewXXX.PageIndex = e.NewPageIndex;
}
Welcome to www.softwaretree.net!
This website is generated completely by static html pages transforming technology.
You can find many excellent audio/video tools there!
|
|
|
|
|
we want to dataentry in gridview so we will take 6 fields
in grid ,and we want to do autogenerated textbox for every field
in pressin tab.how it will be.plz help soon.
thanks®ards
vivek sachan
|
|
|
|
|
hi
i want help you but your question is not clear
plz write again your question clearly.
Essam Moustafa
|
|
|
|