Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! (Pro...  Ask about LINQ
Previous Previous
 
Next Next
New Post 6/27/2008 10:52 AM
Resolved
User is offline Jackhui
17 posts
10th Ranked


Ask about LINQ 

i had face a problem "Operator '==' incompatible with operand types 'Int32' and 'Object'" which

i follow the tutorial of http://www.adefwebserver.com/DotNetNukeHELP/LinqTutorial/

im using VB.NET

 

Thx for help !

 
New Post 6/27/2008 11:02 AM
User is offline Dario Rossa
366 posts
www.dariorossa.it
8th Ranked




Re: Ask about LINQ 

Hi Jackhui,

it looks like you are trying to evaluate if an Object is equal to an Integer number. This causes the compiler to raise the error. Could you post the code you are using?

Best regards,
Dario Rossa


Dario RossaDario Rossa
Personal WebSite: http://www.dariorossa.it
DotNetNuke: http://dotnetnuke.dariorossa.it
 
New Post 6/27/2008 11:27 AM
User is offline Steve Fabian
1516 posts
5th Ranked








Re: Ask about LINQ 

"==" is a C# construct ... . if you're using VB, try a single equal sign...   "="


Steve Fabian
Gooddogs.com
Sit, Stay, Code ... Good boy!
 
New Post 6/28/2008 8:34 AM
User is offline Jackhui
17 posts
10th Ranked


Re: Ask about LINQ 

Sorry i dint say clearly, this error is occur only when i write in ascx page:

 <asp:LinqDataSource ID="LinqDataSource1" runat="server"
    ContextTypeName="Testing2.Testing2DataContext" EnableDelete="True"
    EnableInsert="True" EnableUpdate="True" TableName="TestingTable2s"
   Where="ModuleId == @ModuleId"   >
    <WhereParameters>
        <asp:Parameter Name="ModuleId" Type="Int32" />
    </WhereParameters>
</asp:LinqDataSource>

 

 

 

Another question, can enyone help me convert  it into VB code ?

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if ((e.Row.RowType == DataControlRowType.DataRow))
{
ThingsForSale ThingsForSale = ((ThingsForSale)(e.Row.DataItem));

if ((PortalSecurity.IsInRole("Administrators"))
|| (Entities.Users.UserController.GetCurrentUserInfo().UserID == (int)ThingsForSale.UserID))
{
e.Row.Cells[0].Enabled = true;
}
else
{
e.Row.Cells[0].Text = " ";
}
}
}

 
New Post 6/28/2008 9:03 AM
User is offline Mike Horton
3185 posts
dnn.gmss.org
4th Ranked






Re: Ask about LINQ 

I used to the C# to VB conversion tool from DeveloperFusion. There may still be a couple of errors but you should be able to fix them up.

 

  1. Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
  2.     If (e.Row.RowType = DataControlRowType.DataRow) Then
  3.         Dim ThingsForSale As ThingsForSale = DirectCast((e.Row.DataItem), ThingsForSale)
  4.        
  5.         If (PortalSecurity.IsInRole("Administrators")) OrElse (Entities.Users.UserController.GetCurrentUserInfo().UserID = CInt(ThingsForSale.UserID)) Then
  6.             e.Row.Cells(0).Enabled = True
  7.         Else
  8.             e.Row.Cells(0).Text = " "
  9.         End If
  10.     End If
  11. End Sub

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! (Pro...  Ask about LINQ
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DNNCovered.com - Your Offshore Dotnetnuke Partner
Dnncovered.com is the only Dotnetnuke offshore outsourcing center specializes in DNN skinning and module development with lowest pricing and quality service. Our staff is dedicated to websites based on DNN and our graphic designers are creative and imaginative well enough to provide customers the complete set of skinning solutions and packages
www.dnncovered.com
PointClick.Net DNN Solutions
DotNetNuke Hosting Platform for Business and personal use.
PointClick.Net Hosted Solutions

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP