|
How to use data binding with asp.net in vb.
|
|
|
|
|
That is an excellent subject line.
I suggest you type it in the Google search box and read the first few articles you will get.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Nice Answer.
|
|
|
|
|
I want to add horizontal lines center checkboxlist
Thanks
|
|
|
|
|
I do:
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
<asp:ListItem Text="Vietnam" Value="VietName"></asp:ListItem>
<asp:ListItem Text="China" Value="China"></asp:ListItem>
<asp:ListItem Text="India <hr />" Value="India"></asp:ListItem>
<asp:ListItem Text="France" Value="France"></asp:ListItem>
<asp:ListItem Text="United Kingdom" Value="United Kingdom"></asp:ListItem>
</asp:CheckBoxList>
Thanks
|
|
|
|
|
I don't know. however in WinForms, when you add a MenuItem with text "-" to a Menu it gets shown as a dotted horizontal line; maybe the same works for a CheckBoxList.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Do you mean a horizontal rule after every checkbox?
..Go Green..
|
|
|
|
|
I just registered an account with Arvixe.
I'm deploying "my websites"!
There is a little web app at the root not doinf much, and then I have sub(virtual)directories web app for blogging.
when I navigate to the deployed blog I got an error. can load some DLL.
the problem is...
it is obviously reading the root's web config!
why is that? is it normal or a bug?
my deployment at the moment is like that
(root)\
.. some files ..
Web.config
(VirtualDir) blog\
Web.config
http://domain/blog/robots.txt return the right file
http://domain/blog/default.aspx complains of an error in (root)\Web.config. ie http://domain/web.config...
is that normal? any comments?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
few weeks ago i was learning from this article
Dynamically add and remove user controls[^]
this article is great but its work with except when try to remove the user control i want to remove this part of code
public void HandleRemoveUserControl(object sender, EventArgs e)
{
Button but = sender as Button;
WebUserControl DynamicUserControl = (WebUserControl)but.Parent;
ph1.Controls.Remove(DynamicUserControl);
ltlRemoved.Text += DynamicUserControl.ID + "|";
ltlCount.Text = (Convert.ToInt16(ltlCount.Text) - 1).ToString();
}
this is the code in C# , but the original exercise was in VB , am idiot in VB , did i convert it wrong , and if someone can help me and tell me how we write C# code to determine wich user control fired event
this is the original one in VB
Sub HandleRemoveUserControl(ByVal sender As Object, ByVal e As EventArgs)
'This handles delete event fired from the user control
'Get the user control that fired this event, and remove it
Dim DynamicUserControl As WebUserControl = sender.parent
ph1.Controls.Remove(sender.parent)
'Keep a pipe delimited list of which user controls
'were removed. This will increase the
'viewstate size if the user keeps removing
'dynamic controls, but under normal use
'this is such a small increase in size that it shouldn't be an issue.
ltlRemoved.Text &= DynamicUserControl.ID & "|"
'Also, now that we've removed a user control decrement
'the count of total user controls on the page
ltlCount.Text = Convert.ToInt16(ltlCount.Text) - 1
End Sub
|
|
|
|
|
Try posting your question in the forum at the end of the article then the author will get a notification of it.
The best things in life are not things.
|
|
|
|
|
hi,
i am using LINQ to get data.on this line i am getting error
var comps = from com in cox.Companies where com.ActivityId == id
select com ;
return comps.ToList<company>();
can any one help me?
|
|
|
|
|
You problem is likely that ActivityId and id are different data types (one is Decimal and one is String). I'm guessing id is a string. Convert it to a decimal before using it. For example:
decimal idVal = decimal.Parse(id);
Or if you need to do the reverse, you can use ToString:
string idStr = id.ToString();
|
|
|
|
|
No i check it again...my Id = int32 and ActivityId is int.
|
|
|
|
|
Perhaps the LINQ model and the database are no longer the same (e.g., if the database was changed from int to decimal). Make sure bot the ActivityId in the model and the one in the database are the same type.
|
|
|
|
|
Also, if you have a full stack trace at the time of the exception, that would be useful to see.
|
|
|
|
|
hi all
i want to debug the javascript function in asp.net
is it possible, if yes then how.
thanking you
Vijay Kumar D
|
|
|
|
|
Yep. You may need to use Visual Studio 2010 (rather than VWD Express). I think VWD has debugging, but you can't do certain things (IIRC, I had problems setting breakpoints, so I just threw errors where I wanted a breakpoint to be).
Also, make sure JavaScript debugging is enabled in Internet Explorer. Create a new Web Application and toss some JavaScript in it and you should be able to start debugging (e.g., make a statement that will throw an error and Visual Studio should stop on that line of JS).
|
|
|
|
|
Hi Vijay
Debugging java script in asp.net mostly depents on client side utilities.
first it depends which browser and asp.net technology(1.1, 2.0, 3.5 or 4.0) you are using.
in asp.net 3.5 you can get new features like Trace using ajax extension and also various browsers supports javascript debugging such as in Mozilla you can use firebug, in Safari there is developer's tag and internet explorer better works with ajax trace.
just go through this utilities and ajax extension (if using framework greater than 2.0). this will definately work
Thanks
Ankur Sharma
|
|
|
|
|
|
Hi,
While getting the good stuff at work, my own weekend-company uses the Visual Express editions to get things working. Lately my devmachine crashed and I thought I wanted to use the occasion to "fix" some of the network items on the list. So now I have a database box, a testmachine and a devmachine. But here it comes. When I want to install VS2010 express on my devbox, it seems that MSSQL Express is mandatory. How do I install VS2010 Web without the SQL server?
Any ideas? Thanx in advance!
A good programmer is someone who always looks both ways before crossing a one-way street. (Doug Linder)
|
|
|
|
|
Helfdane wrote: it seems that MSSQL Express is mandatory
Then I'd say there is no way around it. But you can try. At what point did it seem mandatory... what UI did you see and what message did it say? First, I'd say download the ISO that contains everything except for SQL Server. Maybe that will give you an option to install without SQL Server (though you may be required to install SQL before you can run VWD Express... not sure).
You might also see what they have to say here, though I'm not too clear exactly what they mean. You could give it a try if the ISO approach doesn't work.
|
|
|
|
|
I downloaded the MS Web Platform Installer. When I select Visual Web Developer Express, it say's "okay, fine, but you also need SQL 2008R2 Express, Sql2008 R2 Management Tools, SQL Server Native Client, SQL2008 Server System CLR Types, SQL 2008 Server Compact 4.0, Tools for SQL 2008 Server Compact 4.0, Tools for SQL 2008 Server Compact Installer 4.0 and Tools for SQL 2008 Server Compact Installer New Installations 4.0."
And there is no way to unselect them. This would only bog down my dev machine by installing/running this all...
[edit]The link you provided has given me Visual Studio 2010 alright, but not the version which can create web applications, only windows forms allowed I appreciate the help though.
A good programmer is someone who always looks both ways before crossing a one-way street. (Doug Linder)
modified on Friday, May 20, 2011 4:08 PM
|
|
|
|
|
Helfdane wrote: The link you provided has given me Visual Studio 2010 alright, but not the version which can create web applications, only windows forms allowed
The first link I gave you has many things listed for download, including: "This ISO image file includes: Visual Basic 2010 Express, Visual C++ 2010 Express, Visual C# 2010 Express, and Visual Web Developer 2010 Express."
Helfdane wrote: When I select Visual Web Developer Express, it say's [...]
Yeah, I saw that in the WPI download portion. I wonder if an installer will launch and give you the option to avoid installing SQL Server. I am not sure. That is why I recommend you download the ISO... so you don't have to worry about the WPI.
I wouldn't get your hopes up though... SQL Server may just be a required dependency. You could perhaps hack the registry to make the installer think SQL Server is already installed, but there's not telling what kind of havoc that would cause.
|
|
|
|
|
unless you are running a pretty low machine, installing the SQL stuff just to get VS to work should not really bog down anything. Not actually using it and letting it just ride there to make VS happy and getting bogged down by it would suggest you just need a better machine as its not very resource intensive in that state. I have run the full version on some pretty low end Dell towers in the past with no trouble at all.
Just my opinion.
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
|
|
|
|
|
I do recall, when I downloaded and installed VS2008C# Express, I was asked whether I also wanted (1) SQL Server Express and (2) SilverLight. I don't recall the details for VS2008 WebDev Express.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|