|
i need image viewer which is used in website. which shows the scan documents and pictures. the functionality of that image viewer are that it can zoom, rotate, flip, edit text.
plz plz plz plz plz help i use it in my final project of university which is not available for only for desktop. so any one know about that plzzzzzzzzz share with me
|
|
|
|
|
<table><tr><td align=center><table border=0 cellpadding=0 cellspacing=0><tr><td><Img Width=100 height=100 src=Image.aspx?id=" & ds1.Tables(0).Rows(i)("imageId") & "></Img></td></tr></table></td></tr><tr><td align=center><a href=productdetailview.aspx?typeid=1&Productid=" & ds1.Tables(0).Rows(i)("productid") & ">" & ds1.Tables(0).Rows(i)("productname") & "</a></td></tr><tr><td align=center><font color=#ff6900>MRP Rs:-<strike>" & ds1.Tables(0).Rows(i)("price") & "</strike><font></td></tr><tr><td align=center><font color=green>Our Price Rs:-" & ds1.Tables(0).Rows(i)("ourprice") & "<font></td></tr></table>
|
|
|
|
|
Could you be so kind to format your code a bit? It is hard to read. And please give more details about what you want to achieve.
|
|
|
|
|
i need to pass two values using querystring.
Dim myDataAdapter1 As SqlDataAdapter = New SqlDataAdapter("SELECT i.imageid,i.IMAGE,p.productname,p.Price,p.productid,p.ourprice FROM Product p,IMAGE i WHERE p.Typeid='1' AND i.Productid=p.Productid and p.productid in(170)", myConnection)
Dim ds1 As DataSet
ds1 = New DataSet
myDataAdapter1.Fill(ds1, "image")
Dim str As String
str = "<table><tr><td align=center><table border=0 cellpadding=0 cellspacing=0><tr><td><Img Width=100 height=100 src=Image.aspx?id=" & ds1.Tables(0).Rows(i)("imageId") & "></Img></td></tr></table></td></tr><tr><td align=center>
<a href=productdetailview.aspx?typeid=1&Productid=" & ds1.Tables(0).Rows(i)("productid") & "
>
" & ds1.Tables(0).Rows(i)("productname") & "</a></td></tr><tr><td align=center><font color=#ff6900>MRP Rs:-<strike>" & ds1.Tables(0).Rows(i)("price") & "</strike><font></td></tr><tr><td align=center><font color=green>Our Price Rs:-" & ds1.Tables(0).Rows(i)("ourprice") & "<font></td></tr></table>"
Response.Write(str & "<br>")
This is a dynamic creating table on vb.net...which i was mentioned on bold letters.
that is called hyperlink tag which i am going to pass the value using querystring.....it correct way to mention querystring like this......
|
|
|
|
|
I presume this is a big string you are concatenating. If this is not the case then you need to provide more context with which we can help you.
You have not HTML encoded the output of the database. This leaves you vulnerable to attack. If someone manages to trick your applicaiton into storing a script in your database it will be rendered to the page and the browser will just run it.
|
|
|
|
|
Is Business Logic Layer should have all functions as static and same in Data Access Layer.
Because I have seen Imam Spanjar's Framework and also lohtka's framework they use static.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
I don't think there is right or wrong. Since the logic should be stateless using static functions would be the right choice for the business logic. Using non-static functions would be good if you think about using abstract classes and inheritance within your business logic. For myself I use the strategy pattern really often within my business logic, so i implemented non-static functions/methods.
For the data layer I wouldn't use static functions, since the data access has to handle the connection and all transactions within. So for me the Data Access Layer is not stateless which implies using non-static functions/methods.
But it all depends on your personal favor (and the requirements of course).
Hope this helps you a bit.
Regards
Sebastian
|
|
|
|
|
SeMartens wrote: So for me the Data Access Layer is not stateless which implies using non-static functions/methods.
But DataAccessBlock provided by microsoft contains all methods as static....??
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Well, as I said it is a bit of personal favor...
|
|
|
|
|
No, the facade to it is static, but if you dig deep the actual work is done by an instance of a concrete class.
I think... not looked in a while, but its how i'd do it
|
|
|
|
|
how can i change the bg color of a master page from one of its child page programatically
Thanx in advance
|
|
|
|
|
Add this to you content.aspx <%@ MasterType VirtualPath="~/MasterPage.master" %> (using the correct name and path)
then you can access your masterpage from the contentpage using Master.WhateverMasterControlYouWantToAccess .
|
|
|
|
|
First of all thanx for the response
I have added the <@ MasterType VirtualPath="~/MasterPage.master" %> in the content page.
and in the master page the body tag has an id="bodycol" and runat="server"
Now to change the bgcolor of the master page what i should do.
Master.bodycol.Attributes["bgcolor"]="Red";
is not working
|
|
|
|
|
You can use Master.bodycol.Style(System.Web.UI.HtmlTextWriterStyle.BackgroundColor) = "Red"
|
|
|
|
|
i have used your code but it is giving an error.that
MasterPage.bodycol is not accessible in this context because it is Protected
|
|
|
|
|
True, you have to wrap it in a public or friend property and access the property from the content page.
|
|
|
|
|
i am using it like following,
Public Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Master.bodytag.Style(System.Web.UI.HtmlTextWriterStyle.BackgroundColor) = "Green"
End Sub
And it is giving the error
how can it be wrapped in a friend property.
|
|
|
|
|
You can do it like this.
Put this one in the master:
Public WriteOnly Property ChangeColor() As Boolean
Set(ByVal value As Boolean)
bodytag.Style(System.Web.UI.HtmlTextWriterStyle.BackgroundColor) = "Green"
End Set
End Property
And in the contentpage you call it with:
Public Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Master.ChangeColor = true
End Sub
I know, it's a bit ugly...
|
|
|
|
|
Thanx a lot sir for your constant guidance.At last it is working fine.
Thanx again
|
|
|
|
|
|
Where to add this code <%@ MasterType VirtualPath="~/MasterPage.master" %>
In master page or the web page?
|
|
|
|
|
|
Where is the content page? I have only content place holder?
|
|
|
|
|
The content page is what goes inside the content place holder.
Maybe you should read[^] up on it a bit.
|
|
|
|
|
Put all Master page content in a div control with ID and runat="server"
inside form like :
Form opening TAG
DIV u will put
all page stuff
DIV close TAG
Form Close tag
and then use following in your content page code where u wish to change the bgColor for master page
CType(Me.Page.FindControl("ctl00$div1"), HtmlGenericControl).Style.Add("background-color", "Yellow")
where div1 is the DIV control ID in ctl00$div1
With Thanks & Regards
Amit Sk Sharma
|
|
|
|