|
Hello,
We have a need to customize the CreateUserWizard and we put a
DropDownList control in there. And we are filling that DropDownControl
( _drplDealers) in the page_load event of the code behind page on which
the CreatUserWizard control is existing.
This my Page_load event thats filling the drop down and this works fine
I am getting the data.
*******************************************************************************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
drplDealerShipID =
CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("_drplDealers"),
DropDownList)
Dim GetDealers As SqlDataReader = GetGroundingBL.GetDealers()
drplDealerShipID.DataSource = GetDealers
drplDealerShipID.DataValueField = "DealerShipID"
drplDealerShipID.DataTextField = "DealerShipName"
drplDealerShipID.DataBind()
GetDealers.Close()
End Sub
********************************************************************************************************
But in the CreateUserWizard1_CreatedUser event I can't get the selected
value of the _drplDealers
*******************************************************************************************************
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object,
ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim drplDealerShipID As DropDownList = _
CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("_drplDealers"),
DropDownList)
Dim dealer As String
dealer = drplDealerShipID.SelectedValue.ToString
dealer = drplDealerShipID.SelectedValue.ToString
End Sub
********************************************************************************************************
I am not sure the way I am trying to acces the dropdown control that
was filled before in the page_load event is right but it doesnt' throw
any error but I always get nothing although if I have selected a value.
Am I missing some thing here?
Thanks
-L
|
|
|
|
|
Its my bad and goofy.... I have forgotten to put my Page_load event in "If Page.IsnotPostback condition.
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object,
ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim drplDealerShipID As DropDownList = _
If Page.NotIsPostback then
CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("_drplDealers"),
DropDownList)
Dim dealer As String
dealer = drplDealerShipID.SelectedValue.ToString
dealer = drplDealerShipID.SelectedValue.ToString
End if
This works now. Thanks for all of your time who have looked at it.
Thanks
-L
End Sub
|
|
|
|
|
Hi there,
AFAIK, the EnableCaching property only has effect on the datasource returned from the Select method, but not on any output parameter. So IMO, you should manage to cache the output parameter value on your own.
|
|
|
|
|
i want to build a web site which the users will visit and through that site they will build their own web page.this web page will be browsed normally by other users.and the owner will also have the authrity to make changes in it.
adsf e ed w we we w
|
|
|
|
|
Good look with your project. If you have any specific questions about it, feel free to ask them in the forum.
yasar khan wrote: adsf e ed w we we w
qwblr gnh acjlzp?
---
b { font-weight: normal; }
|
|
|
|
|
i need somebody to tell me the basic idea and theme of this project.
|
|
|
|
|
If it were me, I would start here[^], with particular attention to #2.
Good luck!
|
|
|
|
|
|
Hello all,
i am using 2.0 GridView. in this 1st column is CheckBox, 3rd Column is TextBox. These are TempateColumns. Here 3rd Colmn is by Default is Disabled.
When Selecting of Checkbox 3rd column TextBox will enable and 2nd Column Value (let us 12) + 1000 (let us) will Adds and displys in 3rd Checkbox.
after deselection of checkBox these will clears.
using javascript how to do this. any articles or samples?
How to do this using grid view? is there any other control for this.
any help really appriciated. I am not getting solution from couple of days
regards
GV Ramana
|
|
|
|
|
Here are a couple of things that you might need to do:
+ Create an event handler for the client side even onlick of the checkbox button.
+ In the handler, you can get reference to the elements in other columns using the getElementById method, then populate the properties of the elements.
+ To inject the client side script for the check box of each row in the GridView control, you may use the RowDataBound/RowCreated events.
|
|
|
|
|
Hello,
This my a method to call a stored proce and uses a DataReader to read
the data
in the below method I am trying to assign a null value to my datareader
variable
Dim datareader As SqlDataReader
datareader = null
but it doesn't accept.
**********************************
Public Function GetDealers() As SqlDataReader
Dim strSql As String
Dim datareader As SqlDataReader
Try
Dim conn As IDbConnection = GetConnection()
Try
Dim cmd As IDbCommand = conn.CreateCommand()
strSql = "USP_GetDealers"
cmd.CommandText = strSql
cmd.CommandType = CommandType.StoredProcedure
conn.Open()
datareader =
cmd.ExecuteReader(CommandBehavior.CloseConnection)
Finally
End Try
Catch ex As Exception
End Try
Return datareader
End Function
*************************************************
Can some one help me with this..
-L
|
|
|
|
|
So far I have changed it to the following and I think its right. Please let me know if itsn't.
Thanks
-L
Public Function GetDealers() As SqlDataReader
Dim strSql As String
Dim datareader As SqlDataReader
datareader = Nothing
Try
Dim conn As IDbConnection = GetConnection()
Try
Dim cmd As IDbCommand = conn.CreateCommand()
strSql = "USP_GetDealers"
cmd.CommandText = strSql
cmd.CommandType = CommandType.StoredProcedure
conn.Open()
datareader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Finally
End Try
Catch ex As Exception
End Try
Return datareader
End Function
|
|
|
|
|
Yes, that looks runnable. But you are catching any exception that might occur and totally ignoring it. When that happens, your code will crash somewhere else along the line, and you will have no clue why it did...
---
b { font-weight: normal; }
|
|
|
|
|
Yes I got that. And thanks for the reply.
-L
|
|
|
|
|
Hi
Can any body tell me about Serializable() in vb.net/ASP.net and what's is advantage and disadvantage.If any one know out link .Please send me.
Regards
Rajesh
rajesh
|
|
|
|
|
|
Hi All,
We have a web-service based application written in C# and running on IIS, pretty standard ASP.NET 2.0 stuff. We also have a problem, that occasionally the Application terminates for no apparant reason, calling Application_End on its way out.
Can anyone suggest what causes an application with several sessions open to terminate abruptly/has anyone seen this before? I don't believe this can be due to time-outs.
Thanks for any help.
Regards,
Rob Philpott.
|
|
|
|
|
Hi there,
Looks like your application is recycled, if this is the case, you might want to check a couple of things:
+ Does your app edit the bin folder or its subfolders and contents?
+ Does your app edit the web.config file?
+ Do you have any other application that may make changes in the file system of the application?
|
|
|
|
|
Hi, thanks for the response.
Nothing changes in the bin folder, nor does the web.config change. The filesystem remains untouched too I believe as most data is handled by Sql Server.
I did stuble across a setting in IIS under the application pool which automatically 'recycled' my application every 29 hours. What the purpose of this can possibly be I'm unclear - it seems to be like adding a 29 hour fuse to the app. Anyway, I've turned that off and we'll see how things go.
Thanks again for the help.
Regards,
Rob Philpott.
|
|
|
|
|
Okay so I added a grid view to my web page.
But, I dont see the grid object in my code behind so I can play with it.
Does anyhow know how to get the the IDE to define the control in the code behind?
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
nevermind. its there. they just hide the definition. how ignorant
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
I have a project I'm working on in ASP.NET but I'm having problem in the coding of my loging page.I have UserId and Password in my loging page.If the user iput his UserId and Password in the loging page on click of the OK BUTTON then, the login page should compare it with UserId and Password in the Database. if it matches then it should take u to the nextpage but if not he should Throw an Error message INVALID LOGIN. This Is just a normal User Login in ASP.NET .Thanks
Ademola
|
|
|
|
|
|
All I want to do is just like the way we login here as a user.If u input wrong userId and password u will not be able to login but if your userId and password
are correct then u will be login as a user.I will be using SQLSERVER2000 as my batabase.Hope u now understand.Thanks for ur responds
Ademola
|
|
|
|
|
Is this only a declaration of intent, or do you have a question?
Have you tried anything towards building this? Anything at all? Like database model? Made a login form? Written any code?
Who is this "u" person you are talking about all the time? If you write proper english you will be taken more seriously.
---
b { font-weight: normal; }
|
|
|
|