|
iam having a list box where iam getting the list of user name .now i want to select the user name in the list box usign check boxes .how it is possible
|
|
|
|
|
there is a control in asp.net CheckBoxList
|
|
|
|
|
hi wat to do with this will u tell the prcedure plz
|
|
|
|
|
|
lakshmichawala wrote: iam having a list box where iam getting the list of user name .now i want to select the user name in the list box usign check boxes .how it is possible
I think you want to bind users with checkbox control in ListBox.
This is not possible
Question:
Why do you want to put checkbox in Listbox?
You can also bind users list using datalist control and you can put checkbox also.
Regards
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
hello
i create a custom workflow in VS2005 and activate its feature in a site collection and
associate its template with a custom list. i choose "start this workflow when a new item
is created" option when i associate workflow template with the custom list.
when i create a new item in my custom list nothing is happen and when i go to my log file
i face with this exception :
"AutoStart Workflow: System.ArgumentException: New instances of this workflow template are currently disallowed.
at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(SPListItem item, SPFile file, SPWorkflowAssociation association, SPWorkflowEvent startEvent, Boolean bAutoStart, Boolean bCreateOnly)
at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)"
i dont know where is my fault
please help me as soon as posible
tanks in advance
|
|
|
|
|
Hello friends,
I am entering a value through <INPUT> control on .aspx page of my application.
How can i access this value in my code behind page.
Here is how i m entering the value.
<input id="amount" type=text value="100" name="amount">
now i want this value "100" in my code behind page, can anybody tell me how can i do that?
Thanks,
Nagendra.
|
|
|
|
|
3 possible ways
1 - Add a runat=server attribute to the input field. It will be accessible on the server then.
2 - If this input field is in a form and that form is submitting, you can get the value from Request.Form collection.
3 - Use AJAX.
|
|
|
|
|
If you are working in an aspx page it may be a good idea to use asp.net controls as it keeps the page simpler.
Only my opinion though
We are not a Code Charity
|
|
|
|
|
This is CodeBehine
public int a;<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
a = 100;<br />
}
This is your aspx
<input id="Text1" type="text" value="<%= a %>" />
|
|
|
|
|
He is asking for just opposite of what you said.
|
|
|
|
|
i am realy sorry !!!
|
|
|
|
|
Thank you all, i got the desired result.
|
|
|
|
|
I have a gridview that autogeneratecolumns is true.I want to adding button to gridview's header .The problem is button not fired event.
My code :
Protected Sub grdPoint_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdPoint.RowDataBound
If e.Row.RowType = DataControlRowType.Header Then
For i As Integer = 9 To 20
Dim btn As New Button
AddHandler btn.Click, AddressOf click
btn.ID = i
btn.Text = e.Row.Cells(i).Text
btn.EnableViewState = True
btn.CausesValidation = False
e.Row.Cells(i).Controls.Add(btn)
Next
End If
End Sub
Public Sub click(ByVal sender As Object, ByVal e As System.EventArgs)
'do something
End Sub
Please help....
|
|
|
|
|
where you are binding the grid view? Run time or design time?
Copy and paste is a design error
modified on Wednesday, July 2, 2008 3:41 AM
|
|
|
|
|
|
If you are filling the GridView at Page Load, inside
<br />
if not ispostback<br />
block that is the problem.
call the function outside the if block..
Copy and paste is a design error
|
|
|
|
|
I'm sorry. I miss understand .I binding gridview at design time .I use gridview and objectdatasource . My gridview set autogeneratecolumns to true.Sorry I'm new to 2005 .
Thank you for you reply
|
|
|
|
|
Remove the coding from the RowDataBound and add following at page load
and try
For i As Integer = 2 To 19
Dim btn As New Button
AddHandler btn.Click, AddressOf click
btn.ID = i
btn.Text = GridView1.HeaderRow.Cells(i).Text
btn.EnableViewState = True
btn.CausesValidation = False
GridView1.HeaderRow.Cells(i).Controls.Add(btn)
Next
Copy and paste is a design error
|
|
|
|
|
You have created an event called sub click but when does that get assigned to the button?
We are not a Code Charity
|
|
|
|
|
I assigned at RowDatabound Event of gridview.
Protected Sub grdPoint_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdPoint.RowDataBound
If e.Row.RowType = DataControlRowType.Header Then
For i As Integer = 9 To 20
Dim btn As New Button
AddHandler btn.Click, AddressOf click
btn.ID = i
btn.Text = e.Row.Cells(i).Text
btn.EnableViewState = True
btn.CausesValidation = False
e.Row.Cells(i).Controls.Add(btn)
Next
End If
End Sub
Is it wrong? I don't know where to assigned.
Thank you all for answers
|
|
|
|
|
Well you have created the button at runtime in your row data bound event.
But how does the button know which onclick event to use?
Either you have done it wrong or I am confused as to what you have done.
I think you need to add this when your button is created:
btn.Click += new EventHandler(sub_Click);
We are not a Code Charity
|
|
|
|
|
No .netman, what he doing is right, It is VB.net way.
The problem is, he is creating the button on the fly.
So when he click on the button it will automatically erased, as HTTP is stateless.
Copy and paste is a design error
|
|
|
|
|
Thank you for all help.
I find 2 place to put the code to addhandler for button at gridview's header.
first at Pageload don't use if not page ispostback
second at RowCreated
this 2 place have same result .I don't know the best place to put this code but my code is complete .Thank you again to all
|
|
|
|
|
Hi i am using Listbox control...,
In that i am selecting more than one record..,
Using for loop i get what are the records has been selected in that listbox...,
If i selct one record, i can pass that value to my sqlcmd parameter easily...,
Now more than one records are there,
how to pass those values to my stored procedure using sqlcmd parameters?,
Plz any give me some ideas abt this...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|