|
nabeelkhan wrote: "asp:DataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 248px; POSITION: absolute; TOP: 144px"
runat="server" Width="464px" Height="80px" "removed="test"
What is removed="test" here.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi
Guyes
I m starting asp.net 2005 application. pl help me. i want to add/edit/delete
a user in the sql server databaase. Which option should i adopt
1. Thru ADO.Net
2. Thur Sql Server Stored Procedures
Which is the best and why.
Thanks
Sachin Thamke
|
|
|
|
|
Hi friends,
I have a dropdownlist and a button. i want some operation at onselected index of dropdownlist but after selecting the item in the dropdownlist there happens nothing but when i click the button same operation starts processing .can u help me.?
bye
|
|
|
|
|
hi amaneet,
This is because when you are clicking on the button, "PostBack" happens .While clicking on a dropdown list doesn't cause PostBack.
Make the AutoPostBack property of the dropdownlist to TRUE to fire your code.
Tirthadip
|
|
|
|
|
Hi,
I hope you have written your code in dropdownlist_selectedindexchanged() event.Only problem is,you could not execute that code.
Just right click on dropdownlist in properties window set AUTOPOSTBACK property to TRUE.
I hope this will work.
Regards,
Nagraj
Let's Teach Life To Laugh............
|
|
|
|
|
Hi ,
well i'm a beginner into ASP.Net world & i've needed to use that event but i think it doesn't working well with me
what i want to do is just when i write something in the TextBox1 the same text will been written in the Label1 BUT i can do that but just when i leave that textbox then the text or the value in the text box is written in the label but i wanna do that immediatley i mean when i write the first lettre in ma textbox this letter will written in the label too
i hope you understood ma question & i hope you can help
well i heard abt something called AJAX & javascript & some stuufs can you tell me what is that heck man ?
thank you very much for your help
try to be good if you can't be the best
|
|
|
|
|
Hi,
When you double click on textbox it will take you to Textchange procedure you can write what you want there.
May be this is different solution which you expect, if yes Please explain you problem in more detail.
Regards,
Nagraj
|
|
|
|
|
In My project(ASP.NET),Inside a usercontrol I am generaing table dynamically according to the data from the DataBase.
Table Id is also generated dynamically. I required the table Id again in the CS, after creating all tables, for adding datas to a particular dynamically created table.
Please help me to do so.
-- modified at 2:14 Monday 26th June, 2006
|
|
|
|
|
If I want to have a variable available to multiple pages, what is the best way to go about it?
For example: page 1 user enters something in textfield. I want to save that value in multiple pages. Do I use the global.asax?
|
|
|
|
|
Application or Session variables, cookies, or even query strings could accomplish this.
|
|
|
|
|
I've not worked with session variables or cookies before. I will research on my own but do you have any good reference sites/articles off hand?
|
|
|
|
|
My apologies to those of you who have read my multiple questions on my evil datagrid. Okay, it's not evil, but sometimes I think it is.
I have a webpage in which the user enters a part number in a textbox. User then clicks command button to load the datagrid. I created one project and got this to work beautifully thanks to the help of CodeProject people.
Then I found a fully editable datagrid and source code. Since it basically had the functionality I needed I started to modify that. This works differently in that you use a stored procedure, and use parameters to the server.
The original project just dumped out employee information from the Northwind database. Changed stuff so it just dumped out my part IDs. Worked fine. My problem comes from when I pass a parameter (the part number entered by the user). I'm new and confused. This is what happens:
Situation 1:
Call BindData in postback
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
<br />
if(Page.IsPostBack)<br />
{<br />
BindData(); <br />
<br />
}<br />
<br />
}<br />
<br />
private void BindData()<br />
{<br />
strPartNumberInputReference = txtSearchPart.Text;<br />
ds = new DataSet();<br />
SqlParameter param = new SqlParameter("@PartID", strPartNumberInputReference);<br />
ds=SqlHelper.ExecuteDataset(this.connectionString, CommandType.StoredProcedure, "dbo.GetPartInfoTest2", param);<br />
Session["ds"]=ds;<br />
dt = ds.Tables[0];<br />
Session["dt"]=dt;<br />
dgParts.DataSource=dt;<br />
dgParts.DataBind();<br />
txtSearchPart.Text = "";<br />
<br />
}
Go through debugger and goes through code just fine. (The adapters and stuff are in a SQLHelper.cs class.) But it doesn't return any rows.
Situation 2:
Call BindData on postback and when user clicks button:
same code as above plus
private void btnSearchPart_Click(object sender, System.EventArgs e)<br />
{<br />
BindData();<br />
}
When I go through the debugger it goes through the stuff twice as expected. It returns rows, but it returns three blank rows.
I'm not sure at this point where the problem lies. I don't know if is a parameter issue, a BindData issue, a postback issue.
As always...huge thanks.
|
|
|
|
|
I don't want to drag and drop datagrid from tools, but I just want to create it during runtime using vb.net syntax on asp.net page using asp.net 1.1 version. ASP.NET 2003.
dim dg as datagrid
then adding bound column by creating its object. It is fine upto this level. Even it gets implemented. But I couldn't find any article that helps in generating events for RUNTIME GENERATED DATAGRID. So can anybody help in this regard. I would like to implement events like PageIndexChanged, SortCommand, ItemDataBound. So please help in this regard.
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|
I'm using VS.NET 2005, but it should be similar:
DataGrid myDataGrid = new DataGrid();
myDataGrid.PageIndexChanged += new DataGridPageChangedEventHandler(myDataGrid_PageIndexChanged);
...
protected void myDataGrid_PageIndexChanged(object sender, EventArgs e)
{
....
}
|
|
|
|
|
Thanks for ur help
But ur code doesn't work after converting in vb.net means like this
dim dg as new datagrid()
dg.pageindexchanged event is not available.
Does I need to import some file?
Wht should I do now?
I think I need to add RaiseEvent as event bcoz when I write
dg.pageindexchanged
It gives me error saying 'dg.pageindexchanged is a event and cannot be called directly. Use RaiseEvent statement'
Can u suggent me on this event?
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
-- modified at 12:37 Friday 23rd June, 2006
|
|
|
|
|
Sorry, I didn't notice you are using vb.
I don't know exact syntax for handling events in vb, but this is what I found on msdn:[^]
'----------------------------------------------
Visual Basic (Usage)
Dim instance As DataGrid
Dim handler As DataGridPageChangedEventHandler
AddHandler instance.PageIndexChanged, handler
'----------------------------------------------
This code is not supposed to raise event, but assign event handler to event. Event is raised automaticly when you change page of datagrid by clicking it.
I hope it helps
-- modified at 8:44 Sunday 25th June, 2006
|
|
|
|
|
hello guffa,
i have seen u giving suggestions lots of times. It is better if u give code rather than suggestions.
ok.Plz Dont domlike that.
kaya kosta,
byeeeeeeee
|
|
|
|
|
ballameharmurali wrote: i have seen u giving suggestions lots of times. It is better if u give code rather than suggestions.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Give a man some code and you solve his problem today. Teach a man to code and you solve his problems for a lifetime.
By giving suggestions and links to documentation Guffa is teaching you how to think. If he just straight gave the code then people would just copy and paste the code and never really understand how it works. So what happens is that they come back and ask for more and more code. I've seen it several times when I answer the same person over and over with pretty much the same question with a minor modification. If they'd read the docs rather than just copy the code they wouldn't need to keep asking pretty much the same question over and over and over and over and over and over and over and over and ove and over and over and over... Well... you get the idea.... I hope.
Scottish Developers events:
* .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy
* Developer Day Scotland: are you interested in speaking or attending?
My: Website | Blog
|
|
|
|
|
everyone should first facing with problem and if can't find soultion codeproject's members can help each-other.
"If you haven't succsess in life that mean you didn't try anything in your life"
|
|
|
|
|
if (question.Topic == QuestionTopics.Code) {
Reply.Write(knowledge.DoCorrections(question.Code));
} else {
Reply.Write(knowledge.FindSuggestion(question.Problem));
}
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi
I want to Append the data to the same repeater for dynamic menu. plz help me.
[ravi sankar]
k.ravi sankar
|
|
|
|
|
|
Hi friends,
I am using msgbox in my asp.net code(2005)
If MsgBox("Are u sure to Delete", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
..........
End If
This will work fine on local machine.But when I upload my webpages this msgbox give error.
"Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."
I don't know why this is so.
If you know plz share with me.
Thanks,
|
|
|
|
|
hey Thanks
i have done this but it works only on ones own machine ,
if the hostname or ip adrress is of remote machine, it says access denied
how do we come over it
Thanks
Jiny
|
|
|
|