|
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
|
|
|
|
|
It has been just 3 and a half hours since you replied to minhpc_bk - He might be asleep, shopping, visiting family, any number of other things that mean he has not yet seen your response. HAVE PATIENCE!!!
If your problem is really that urgent that you are trying to embarrass those that try to help you in to giving you more assistance as a priority then I suggest that you can get help from Microsoft Support. They will be glad to hand-hold you right through your problem for a small fee. The people here give up their time for free in order to help their peers. A little more appreciation of their dedication to helping solve other people's problems would be nice. Remember that they don't have to help you, and if they didn't you wouldn't get anywhere at all.
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
-- modified at 9:58 Friday 23rd June, 2006
|
|
|
|
|
A six-pack for the excellent reply Colin
|
|
|
|
|
I dint mean to offend or embarrass anyone...I`m new to programming , thats y little implulsive.
I really appreciate the help and time people in this forum provide
Sorry once again if any offence meant.
thanks
|
|
|
|
|
We have an ASP with C# application that needs to perform some database work and if that is successful communicate with the clients COM ports and if that is successful commit the transaction and if not rollback.
Right now the applcation is registering a VB script for COM port work but gets no feedback on the success and blindly commits that transaction assuming it worked (not good). This is all pretty new to me, I have been doing C++ only.
Any advice would be appreciated.
Thanks,
Todd
|
|
|
|
|
Hi,
i many of the projects which went on the production server (uses sql server 2000)of other countries there was a common exception in all of them.It is the date conversion exception.Many suggest the way to do it is to
use culture attribute to store date in the sql server .Not shoor about it.Please suggest a way to store the date in the sql server such that
no problem would arise in future projects.
Thnks and regards,
|
|
|
|
|
Hi,
i have a dropdownlist in which on changing the selection i have to give a tooltip above it to display the item selected because the size of the dropwnlist is small to accomodate the entire text .I tried in a dummy page like this.
div id="tooltip" style="LEFT: 488px; WIDTH: 229px; POSITION: absolute; TOP: 130px; HEIGHT: 19px" noWrap>
asp:dropdownlist id="ddl" oonkeyup='showTooltip()' style="Z-INDEX: 101; LEFT: 518px; " runat="server" Width="66px" !-->
But in real scenario in all the pages in which i have dropdownlist i have to incorporate this feature,but i cant change the layout of these pages to accomodate a div .So is there a way to show this tooltip dynamically using javascript (i.e even the div has to be created dynamically just above the ddl)on onkeyup event of the dropdownlist.
pls help me on this ,
thnks in advance
-- modified at 8:20 Friday 23rd June, 2006
|
|
|
|