|
Lets get this straight u r saying u got a datagrid and u want to read only two columns from the source (which might very well be a database) and display them is this right.
If so lemme know and I will help
If only they could see what I see in my mind
|
|
|
|
|
I want to read all the columns from datagrid
Suppose i have datagrid:
This much Data will be shown in datagrid
Name Age Address State
a 10 abc ss
b 20 vvv dd
Now i want to print only two columns
The result to be printed should be
Name Age
a 10
b 20
Can u help
bye
Varun
|
|
|
|
|
OleDbCommmand cmd = new OleDbCommand("Select Name, Age from DATABASENAME",Conn);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(ds2); //da is DataAdapter and ds2 is Dataset
DataGrid2.DataSource = ds2.Tables[0];
DataGrid2.DataBind();
If only they could see what I see in my mind
|
|
|
|
|
I will call all 4 columns from database but print only 2 columns as i have shown earlier also
|
|
|
|
|
|
Hi
I'm currently doing a project in asp.net. I need pass values to the controls in the third party website. I want to create objects to the controls in the web site. Is there any solution to my problem.
Help me plz...
Thanks in advance
kani
|
|
|
|
|
Kani ur problem is not clear at all, frankly I dont even understand what you are saying please be more descriptive
If only they could see what I see in my mind
|
|
|
|
|
Hi alyeasad
In my project, I'm accessing indian customs web site. I want to pass the username,password to the login page and also the submit button should be set true.
I tried in vb.net, I used the web browser. I'm able to pass the values.
The code is
AxWebBrowser1.Document.theForm.Username.value = "###"
I need the same in asp.net.
Is there any possibility. Please help.
Thanks in Advance..
kani
|
|
|
|
|
I cant say I clearly understood what u said but here goes.
U can move info from one page to another or from one website to another using Session.
Session["anyname"] = "Username";
Session["anypassword"] = "Password";
this value can be accessed throughout ur project on any form (page).
As for the submit button when u say it shud be true , do u mean enabled cause, if not then whats true ??
If only they could see what I see in my mind
|
|
|
|
|
Hi
Thanks for your reply.
I think still you are not clear with my problem.
I need to create objects to the controls like username and password textboxes in that website from my asp.net application.
Also the event handling method for the button 'submit' in that web page should be written in my asp.net application.
Help me ..
Thanks
kani
|
|
|
|
|
hi,
Can anyone tell me how can i send mails without using SMTP Server provided by .NET (without using SMTPServer.Send())
I want to send mails in a large number so i dont want to use the relay server of the IIS, as it is slow.
Can anyone tell me how i can bypass the SMTP Server and directly send mail to the internet.
It will be a great help,
Thanks
Sushant Duggal.
|
|
|
|
|
I think may be not, you should user stmpserver to specifice, if you can please tell me back
Thanks
................
|
|
|
|
|
Hi,
I am using web parts in my application. I have dragged and dropped web part manager, web part zone on my aspx page. Then I dropped few controls in web part zone and gave title etc. The problem is, at the design time I can see the image to open the menu to minimise and close the web part zone. But when I run my application in IE, I can't see that image to open the popup menu to minimise and close.
Please assist.
Thanks in advance !!
Chintan
|
|
|
|
|
I am doing project in ASP.NET(VB),I am having a dropdownlist in all rows in datagrid, and i want to update database on last dropdaown list's selected index.
Please send me the solution soon.
Thanks in advance
|
|
|
|
|
|
go to here
http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vbtchTopQuestionsAboutASPNETDataGridServerControl.asp?frame=true
one of items is your case
be happy
|
|
|
|
|
Hi
How can public methods in User Controls be accessed from a form's code behind. I have created a User Controls with a public accessor method:
public double Score
{
get { return score;}
set { score = value; }
}
When I drag this User Control onto a Web Form I cannot seem to access the Score from my Web Form code behind.
Thanks.
Kobus
|
|
|
|
|
there is no special work for it.
you can access to your user control id (such as usercontrol1) and use methods:
usercontrol1.score();
of course i test it on .net 2005 .
which .netframework you use?
|
|
|
|
|
If you try to use Contains in an .ASPX page it will error the reason is the single quote you have to use.
So if you code "Select f1, f2, f3 from T1 where CONTAINS (F2, 'text*')" you will get an error at compile/run because of the single quote around your contains term. You cannot use the \ to escape the single quote either.
Does anyone know a way around this?
- Rex
"You have an arrow in your butt!" - Fiona
Welcome to CP in your language. Post the unicode version in My CP Blog [ ^ ] now.
People who don't understand how awesome Firefox is have never used CPhog[^]CPhog. The act of using CPhog (Firefox)[^] alone doesn't make Firefox cool. It opens your eyes to the possibilities and then you start looking for other things like CPhog (Firefox)[^] and your eyes are suddenly open to all sorts of useful things all through Firefox. - (Self Quote)
|
|
|
|
|
What do you mean? An apostrophe can be put in a string without problems.
Exactly what does your code look like, and what is the error message that you get?
---
b { font-weight: normal; }
|
|
|
|
|
Hi. I have a GridView bound to a DataTable. The columns of the GridView are TemplateColumns with a TextBox in it.
The textbox columns appear with the values of the DataTable.
What I am trying to do is setting the TextBox to ReadOnly if certain conditions are met. I tried to do this within a handle to OnRowCreated (I get the created row in the eventargs e.Row). The problem is that I don't know how to get the TextBox object of a specific column in that row and set it's properties to ReadOnly.
Any help?
Thanks!
|
|
|
|
|
To get reference to the TextBox, you simply use the FindControl method in the event handler of the RowCreated event:
TextBox textBox = e.Row.FindControl('TextBoxId') as TextBox; You now can set the ReadOnly property of the TextBox. However, you'd better use the RowDataBound event to set the ReadOnly property as the RowCreated event always happens, and you might not need that on postback. In addition, you can also use the databinding expression to set the ReadOnly property of the TextBox in the control declaration:
... ReadOnly='<%# ... %>' ...
|
|
|
|
|
Hi
I have a simple web page that written in C# and Asp.Net.
In that page i have asimple insert query that work by
Microsoft Accees;) .
When I run it in my camputer az a project I don't reciev this message but when i placed on my host or on my iis I reciev this massage (.
If You Know How Can I solv this problem plz
answer me az soon az possible
Thanks alot .
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
hii
write in square braces means [ ] which value you have to inserted in data bases . I think tis problem is due to likages of connection
hope this will help you
Best Regards
Sandeep Thakur
|
|
|
|