|
|
Hi,
I have tried using accordian but that`s not what i am trying to achieve here, please guide me If I am doing wrong.
If you look at the example given by me what I want is the Show Times 1 to shrink when Show Time 2 is clicked and display all the movies under show time 2.
I understand that under each Show Time there has to be panel, but my list is dynamic so I cannot manually set the number of panels. Can that be set from the code ?
What I am looking is for a SINGLE sliding panel which floats around every row in the table, So if Row 1 is clicked the panel displays the show times under it, when Row 2 is clicked, the data inside row 1 Is shrinked and the panel floats to down displaying the movies under Row 2.
Any Ideas?
Thanks
Vinay
|
|
|
|
|
How do I customise the behaviour of the asp:SiteMapPath to not show the root siteMapNode as a part of the breadcrumb.
<siteMapNode title="Root"…>
<siteMapNode title="Level_1_1"…>
</siteMapNode>
<siteMapNode title="Level_1_2"…>
<siteMapNode title="Level_2_1"…>
</siteMapNode>
</siteMapNode>
</siteMapNode>
Shold in the breadcrumb look like: Level_1_2 > Level_2_1
and not: Root > Level_1_2 > Level_2_1
_____________________________
...and justice for all
|
|
|
|
|
Place the following code in Global.asax:
void Application_Start(object sender, EventArgs e)
{
SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(HideRootNode);
}
static SiteMapNode HideRootNode(Object sender, SiteMapResolveEventArgs e)
{
SiteMapNode node = SiteMap.CurrentNode.Clone();
SiteMapNode current = node;
SiteMapNode root = SiteMap.RootNode;
if (current != root)
{
while (node.ParentNode != root)
{
node.ParentNode = node.ParentNode.Clone();
node = node.ParentNode;
}
node.ParentNode = null;
}
return current;
}
|
|
|
|
|
Thanks,
This little css-hack also made it for me:
.PageHeading > a:first-child + span + span<br />
{<br />
display: none;<br />
}
_____________________________
...and justice for all
|
|
|
|
|
Please suggest some IEEE projects in ASP.NET
|
|
|
|
|
|
First I must say, that I'm rather a beginner with ASP.NET, so my question might be stupid. If it is, please spend some time to explain me why it's like this
Let's say I have a DropDownList bound to a collection of items of some type. For example this type:
public class Country
{
public int Id
{
get;
set;
}
public string Code
{
get;
set;
}
public string Name
{
get;
set;
}
}
On the aspx page I place a DropDownList like this (button is only for triggering postbacks):
<asp:DropDownList runat="server" ID="test" DataTextField="Name" DataValueField="Code" /><br />
<asp:Button runat="server" ID="temp" Text="Postback" />
And in the code-behind for aspx I write:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
{
test.DataSource = WebApplication2.Controls.CountriesDropDown.CountriesList();
DataBind();
}
}
(WebApplication2.Controls.CountriesDropDown.CountriesList() returns a Collection<country> instance)
And now, when I hit the postback button, on the server side I see the DataSource is null. However in the browser I can still see the countries displayed earlier.
Is there any way to have access to objects being bound, cause I don't want to generate the list again.
I didn't turn off ViewState (I found this suggestion when searching for solution)
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
lukasz_nowakowski wrote: if (!IsPostBack) { test.DataSource = WebApplication2.Controls.CountriesDropDown.CountriesList(); DataBind(); }
Change this to:
if (!IsPostBack)
{
test.DataSource = WebApplication2.Controls.CountriesDropDown.CountriesList();
test.DataBind();
}
|
|
|
|
|
Yeah... it is this way... I was writing this code from memory, not copied from Visual Studio. Sorry for mistake
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
I'm sending mail with excel attchment and it's working fine when I run it from my local
machine. but if I try to access it from another machine it's giving me this
Error:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Error coming on first line of below code
Microsoft.Office.Interop.Excel.Workbook aBook;
Microsoft.Office.Interop.Excel.Application ExlApp = new Microsoft.Office.Interop.Excel.Application();
i have given all rights (http://blog.crowe.co.nz/archive/2006/03/02/589.aspx[^]) still error is coming
please help me out as soon as possible
|
|
|
|
|
|
Don't cross post here. If anybody answers your previous question then you will be notified in your registered email.
|
|
|
|
|
Hi,
We might want to use Entity Framework 4 for a project. Everything that we need is in the context. We have a couple of guys working on this project, how do we all work on the model if it creates just 1 file?
Is it possible to add additional properties to a class that was created?
Also, how would I use classes that I have created already in my project? Lets say I have a User class and a User class that the EF creates, what now?
Thanks
|
|
|
|
|
Hi,
I have created one template in MsWord 2007 and placed ImagePlaceHolder1 in it.I am able to find and replace the text but how to find ImagePlaceHolder1 in that Word Doc and replace with the one i select in the combo.
At the end I want to save it in .pdf format as shown below.
object format = Word.WdSaveFormat.wdFormatPDF;
_wordapp.ActiveDocument.SaveAs(ref save, ref format, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing);
Want to submit this project today.
Any help is appreciated.
Thanks,
Harish
|
|
|
|
|
See the example in VB Code, How to find a imageplaceholder in the document
Selection.GoTo What:=wdGoToGraphic, Which:=wdGoToFirst, Count:=1, Name:=""
Selection.Find.ClearFormatting
With Selection.Find
.Text = "ImagePlaceHolder1"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Also this [link] might help you.
|
|
|
|
|
Instead of place holder i placed 'Sign1' Text in Word 2007 with this i tried your code to replace it with image but iam getting System.Drawing.Bitmap in .pdf while saving instead i should .jpg image
Below is my code
object[] Parameters;
Parameters = new object[15];
Parameters[0] = "Sign1";
Parameters[1] = _missing;
Parameters[2] = _missing; ;
Parameters[3] = _missing; ;
Parameters[4] = _missing; ;
Parameters[5] = _missing;
Parameters[6] = _missing;
Parameters[7] = _missing;
Parameters[8] = _missing;
Parameters[9] = img;
Parameters[10] = _missing;
Parameters[11] = _missing;
Parameters[12] = _missing;
Parameters[13] = _missing;
Parameters[14] = _missing;
myfind.GetType().InvokeMember("Execute", BindingFlags.InvokeMethod, null, myfind, Parameters);
I am getting from img = GetSignPath();//method used to
Clipboard.SetDataObject(img);
i am getting img from below mentioned code inside GetSignPath();
MemoryStream ms = new MemoryStream((byte[])ds.Tables[0].Rows[0]["SignatureImage"]);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
imgPath = "C:\\" + comboempname.Text + ".JPG".Trim();
img.Save(imgPath);
//return imgPath;
return img;
Any Help is Appreciated
Thanks,
Harish
|
|
|
|
|
dears,i am using vs2005 web application.
one image information in hex format is like as follows.
000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A
my requirement is this hex data need to store in sql db and need to display in a website.
can anybdy help me to solve my problem??
In sql i inserted this data in an image coloumn like as follows(added ox).
INSERT INTO [Test_mm].[dbo].[PictureTable]
([Title]
,[DateAdded]
,[MIMEType]
,[Image])
VALUES
('jjj'
,'6/22/2010 3:12:04 PM'
,'hjhg'
,0x000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A)
after inserting the data i tried to display this using the code below.But the picture box is coming with a red colour cross button?
Dim ImageID As Integer = Convert.ToInt32(Request.QueryString("ImageID"))
Using myConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("NorthwindConnection").ConnectionString)
Const SQL As String = "SELECT [MIMEType], [Image] FROM [PictureTable] WHERE [ImageID] = @ImageID"
Dim myCommand As New SqlCommand(SQL, myConnection)
myCommand.Parameters.AddWithValue("@ImageID", ImageID)
myConnection.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader
If myReader.Read Then
Response.ContentType = myReader("MIMEType").ToString()
Response.BinaryWrite(myReader("Image"))
End If
myReader.Close()
myConnection.Close()
End Using
can anybdy help me to solve this ?i am troubling lot..pls pls help me
MEENU
|
|
|
|
|
Okay, here is my problem: I've got a web site that allows users to edit their profile. Part of this profile information will be used to populate a contact page which will include a picture of the user. Now, I'm able to upload the pictures just fine into a sql 2005 database and display that image, but if the user doesn't add an image (which they are allow not to do) then I get stuck on how to populate that into my sql stored procedure's parameter list. I keep getting an error every time I try saving the profile without an image in the file upload box. Here is the code that I am using to try to put in a dbnull value:
cmd.Parameters.AddWithValue("@picture", SqlDbType.Image).Value = DBNull.Value
Any ideas on what I'm doing wrong?
|
|
|
|
|
That doesn't look right to me. Can't you just put
cmd.Parameters.AddWithValue("@picture", DBNull.Value)
?
(Assuming your "picture" field allows nulls, of course...)
|
|
|
|
|
I guess make image field mandatory or call this method only if there is value in @picture.
Thanks,
RK..
|
|
|
|
|
hello
Can I start a thread from aspx code behind (long running stored proc call)
Thread SomeThread = new Thread(this.RunLongRunningCommand);
SomeThread.Start(SomeArg);
I'm worried aspx page worker's thread life cycle.
dev
|
|
|
|
|
|
As an alternative to using System.Threading, which I have to admit I find a difficult class to get to grips with, can I suggest an alternative method for executing a long running process (LRP) within as ASP.NET appliucation...
..this is only of any real use when you can set up your LRP in such a way that you can execute it by passing just an ID number (say to a database record), or at least only a relatively small amount of data to it via a QueryString.
Set up your LRP within a generic handler, say "lrp.ashx"
Them, in your webapage when you want to execute this, add:
Try
Dim request As System.Net.HttpWebRequest = DirectCast(System.Net.WebRequest.Create(HttpPathOf("lrp.ashx")), System.Net.HttpWebRequest)
request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"
Dim postData As String = "id=" & nid.ToString ' for example - set up whatever data you need to post to the handler here
request.ContentLength = postData.Length
Dim writer As New System.IO.StreamWriter(request.GetRequestStream(), System.Text.Encoding.ASCII)
writer.Write(postData)
writer.Close()
Catch ex As Exception
' whatever
End Try
Note: by
HttpPathOf("lrp.ashx")
I mean the full URL (ie starting "http://www.mydomain...." to lrp.ashx - you can't just use a relative URL or Server.MapPath
The above code will execute lrp.ashx in a new process, adn you can (for example) immediately redirect to another page while it is still executing, adn yor users will never know....
Perhaps someone here willl tell me why I shouldn't be doiung this, but I've found it works very well
And no, I can't translate it into C#!
|
|
|
|
|
I have just gotten my new assignment; which is to design an universal (generic) table editor in ASP.NET, that fetches data from SQL and is able to CRUD this data.
I quess this is a well known area to most experienced ASP.NET developers (I have just started with ASP.NET) so I presume there are solid code examples "out there".
I would be most thankful if someone provided a good solid example for the above mentioned.
Thanks in advance.
|
|
|
|