|
Dim item As DataGridItem<br />
Dim sectionIDs() As Int16<br />
Dim selectCount As Int16<br />
<br />
For Each item In grdSection.Items<br />
If CType(item.FindControl("chkSelect"), CheckBox).Checked Then<br />
selectCount += 1<br />
ReDim Preserve sectionIDs(selectCount - 1)<br />
sectionIDs(selectCount - 1) = item.Cells(2).Text<br />
End If<br />
Next<br />
<br />
If Not sectionIDs Is Nothing Then<br />
Session.Add("confirmSectionDelete", sectionIDs)<br />
Response.Redirect("DeleteSections.aspx")<br />
End If
www.programmingknowledge.com[^]
|
|
|
|
|
Sorry, not helpful.
Live in fragments no longer. Only connect.
|
|
|
|
|
Look at the bit about session...
|
|
|
|
|
I may be wrong but this has nothing to do with the question that was asked.
|
|
|
|
|
You either have to come up with some mechanism to seperate the data by user in your arraylists or just use a session variable.
|
|
|
|
|
I am having one Dropdownlist, depending upon dropdownlist selection, I am filling a Listbox. I gave a RequiredField Validator for ListBox. But to my surprise it did not validate if user does not select anything from Listbox.
Finally I created a Default ListItem like "--Select One--" and made through code I made it selected by default.
My problem seems to be solved now, but is there any other alternative?, I wonder is this the case with everyone here.
Please suggest!!
Thanks
Sony
|
|
|
|
|
I think you're doing okay. I know I would you a Select Case Implementation if I were you.
Live in fragments no longer. Only connect.
|
|
|
|
|
Hi All
I have a program looking at a local (TEST) SQL database. In Visual Studio 2003 I CAN connect to the TEST SQL server through the Server Explorer and see all the tables. I can use an MS project to connect to that db and see all the tables, but when I use my app ASP.NET (code behind) to connect I get:
Fill: SelectCommand.Connection property has not been initialized.
To confuse me even more, when I copy the code to my live system it works fine?
I have two connection strings, one for test (doesnt work) and one for live (does work):
TEST:
Dim strCn As String = _
"Data Source=PCName;Initial Catalog=CFData;Integrated Security=SSPI;"
LIVE:
Dim strCn As String = _
"Data Source=##.#.##.##,1433;Network Library=DBMSSOCN;Initial Catalog=CFData;User ID=sa;Password=password;"
These two connection strings are connecting to different SQL databases, TEST is a local copy and LIVE is one on a remote server.
I have tried all kinds of variations on the local connection string but am pulling my hair out!
Can anybody help, PLEEEAAASSSEE
Thanks in advance
|
|
|
|
|
Try the following:
Data Source=(local);Integrated Security=true;Initial Catalog=CFData;
Mike Lasseter
|
|
|
|
|
Thanks for this Mike, but unfortunatly it still does not work. I have however 'think' I have sussed it by using :
Data Source=PCName;Initial Catalog=CFData;User Id=sa;Password=password
I did not want to have to specify the id/pw but heyho we can't have everything. This will still bug me 'why' though. I assume it is something to do with database permissions.
Kind regards
|
|
|
|
|
In order for it to work without a password your user must be setup using windows authentication in SQL Server
Mike Lasseter
|
|
|
|
|
Please some help the asp pages are shown same on different resulotions.I have porblum that when i change the reslotion then the asp pages are not well designe.
|
|
|
|
|
maybe thats because you have a stiff(fixed) layout at design time. All the pages that you might have made are for some particular resolution. And the tables on which they reside, are of fixed lengths. So, you can simply make those tables to work on %age basis rather than their widths using pixels wise.
|
|
|
|
|
hi all,
How to use Hot keys facility for buttons in c#.net.
Thanx in advance...
your
peter
|
|
|
|
|
|
hi all,
When i enter a letter in the text box i have to get the all the
words starting with the letter from the database(sql server) and display
the first value in the text box.
Thanx in advance.........
your
peter
|
|
|
|
|
check and try some googling "AJAX", for an example simply look at google suggest.
|
|
|
|
|
sir,
Thanx for reply . But i didn't understand your reply.Please give me your
suggestion more clearly.
Thank You
your
peter
|
|
|
|
|
please search "AJAX" on google. And also google has used the same technique in "Google Sugest". They do the same thing as soon as you yype in some thing then at the same time the start to give you your results etc. check it out. I have found this link may be this can help you "http://www.google.com/webhp?complete=1&hl=en[^]"
Regards,
Hammad Arshad
|
|
|
|
|
Hello members,
I am getting "Object reference not set to an instance of an object." error when i am clicking one of my buttons AddPupil_Click to add pupils from the selected pupils checkbox from a grid.
My code goes as follows :
on front page
<asp:button runat="server" id="AddPupil" cssclass="" text="Add ticked pupils to group" onclick="AddPupil_Click">
on cs page :
protected void AddPupil_Click(object sender, EventArgs e)
{
String[] IDs = Request["pupilIDs"].Split('#');
}
i had also instantaited the variable but , all in vain.
Can anybody please help me asap.
Thanks in advance .
Jai
|
|
|
|
|
Jai Prakash Singh wrote: Request["pupilIDs"]
If this returns null, you will get the exception message you describe. First check the value exists before trying to Split it
---
How to get answers to your questions[^]
|
|
|
|
|
Hello everybody! I have the next problem, I have an Image control on Web Form and i want to make some event when I click on that image, for example to jump on another page. But there is no OnClick or Click events in Image control.
|
|
|
|
|
You can use the ImageButton control instead.
|
|
|
|
|
Thanks
|
|
|
|
|
Hi
I am developing a UserControl, I save this user control code to the database, which will be loaded dynamically to the Page.
In my user control code consist of following lines:
<asp:SqlDataSource ID="GetDataFromDatabase" runat="server" ConnectionString="<%$ ConnectionStrings:sConnectionString %>"
SelectCommand="SELECT field_defaultvalue FROM cp_productfields WHERE field_product_id='ProductID' AND field_type='DropDownList' AND field_Control_ID='ddVCAuflag'"
ProviderName="<%$ ConnectionStrings:sConnectionString.ProviderName %>"></asp:SqlDataSource>
At this moment, I am manually puting this data to data
base using "INSERT INTO" statement.
But I get following error:
Incorrect syntax near 'ProductID'.
This is because single quotation mark around ProductID (field_product_id='ProductID').
If I change this single quotation to double quotation (e.g. field_id="ProductID") then this works okay.
But in that scenario, SELECT statement fails while execution.
Can anyone please let me know how can I achieve both successfully?
Thanks in advance.
|
|
|
|