|
Imran Khan Pathan wrote: please don't forget to vote on the post that helped you.
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
ROTFL - yes, that is quite ironic.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
sashidhar wrote: LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
I tried to give him 5 vote but it did't work. when I click on button to vote, it goes to continuous process then I have to refresh page again. I am not able to vote any post here.
please don't forget to vote on the post that helped you.
|
|
|
|
|
Imran Khan Pathan wrote: hCell.InnerText = "Username";
hRow.Cells.Add(hCell);
hTable.Rows.Add(hRow);
// Now here I want to return created controls in html string.
Now use the following to get the string :
StringBuilder sb = new StringBuilder();
StringWriter tw = new StringWriter(sb);
HtmlTextWriter hw = new HtmlTextWriter(tw);
hTable.RenderControl(tw);
string renderedoutput = sb.ToString();
Now find the control string from the object, inspect renderedoutput .
|
|
|
|
|
im using repeater control.had a edit button which redirect to another page(edit.aspx).
in edit.aspx i had few textboxes,ddl's and fileupload controls for images..
using sessions im transferring data of employees from repeater page to edit.aspx page.
similarly i want to transfer images of that particular employee..
tried using handler.ashx im gettin the last uploaded image(image control) for every employee...
help me....
repeater page
protected void Repeater1_ItemCommand1(object source, RepeaterCommandEventArgs e)
{
}
if (e.CommandName == "edit")
{
}
edit.aspx
Image1.ImageUrl = "handler3.ashx?staffID=" + ("staffID");
TextBox5.Text = Session["headline"].ToString();
|
|
|
|
|
madhukk wrote: using sessions im transferring data of employees from repeater page to edit.aspx page.
Why not just pass it on the URL ?
madhukk wrote: similarly i want to transfer images of that particular employee..
Where do you store them ?
madhukk wrote: Image1.ImageUrl = "handler3.ashx?staffID=" + ("staffID");
TextBox5.Text = Session["headline"].ToString();
What are you writing this for ? Is it for your own study ? Will it ever be used by anyone ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
im storing in sql server.
this is used for my project...
|
|
|
|
|
OK, so you're writing it for yourself, or for someone to use ?
Why not just pass the id of the image back to the main page then and load it from there ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Do you not want to be helped anymore ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
passed id to imageurl of image using session...
now i got it thanks...
and im trying to display thumbnail of the uploaded image.
used temporary data table, its working but as i had many uploads its some complicated...
any other method to display uploded image as thumbnail in image control...
thanks
|
|
|
|
|
madhukk wrote: used temporary data table, its working but as i had many uploads its some complicated...
any other method to display uploded image as thumbnail in image control...
The image is associated with the user, right ? So, just write a http handler that takes the id of the image or the user on the query string, looks up the data and returns it. Make this the URL for your image.
madhukk wrote: passed id to imageurl of image using session...
I'm not sure why you're asking me for advice, as you appear to, in every step, doing the opposite of what I've suggested. Filling your session with all this data is going to affect performance.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
can we display the thumbnail of image before inserting into database....
|
|
|
|
|
Why would you want to ? What is it that you're trying to do ? If you'd answer this question it might help me make a recommendation.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i want to display the uploaded image once i browse through fileupload control.. but before it is saved in database to check the image uploaded correctly or not..
|
|
|
|
|
You can't do that, because until it exists somewhere on your system, you can't send it back to the client. To send it back as a byte stream requires a seperate page or HTTP handler. It's just not possible.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
using http handler im getting image to a page..
im unable to get all the three images... only 1st image is displayed...
SqlDataReader dr = command.ExecuteReader();
dr.Read();
context.Response.BinaryWrite((Byte[])dr[0]);
cnn.Close();
context.Response.End();
Image1.ImageUrl = "handler3.ashx?staffID=" +
Session["staffid"].ToString();
|
|
|
|
|
I hv created cart dynamically at runtime through datatable............and i assigned it to the source of a datalist..............nw i want to edit quantity of products through datalist dynamically..........i tried many times.......but its not wrking properly.......this is my code.....
<br />
Dim dt As DataTable = Session("Cart")<br />
Dim dr As DataRow<br />
For i As Integer = 0 To DataList1.Items.Count - 1<br />
Dim txt As Integer = CType(DataList1.Items(i).FindControl("txtQty"), TextBox).Text<br />
Dim hf As Integer = CType(DataList1.Items(i).FindControl("hfatc"), HiddenField).Value<br />
Dim val As Integer = Convert.ToInt32(txt)<br />
For Each dr In dt.Rows<br />
If dr("ItemNo") = hf Then<br />
dr("ItemQty") = val<br />
Session("Cart") = dt<br />
DataList1.DataSource = dt<br />
DataList1.DataBind()<br />
lblTtl.Text = "Rs." & GetItemTotal()<br />
End If<br />
Next<br />
Next<br />
plz tell me.........where i m lacking behind.............is there any other way to do it.........
plz guide me a bit.........
|
|
|
|
|
KhandelwalA wrote: Dim dt As DataTable = Session("Cart")
Putting a datatable into the session seems wasteful to me.
KhandelwalA wrote: For i As Integer = 0 To DataList1.Items.Count - 1
Does this work ? In C# it would miss the last item.
KhandelwalA wrote: Session("Cart") = dt
Every time ? Why on earth are you doing this inside the loop ?
KhandelwalA wrote: DataList1.DataSource = dt
DataList1.DataBind()
Wow - again, this is very wasteful.
KhandelwalA wrote: is there any other way to do it.........
There's much better ways to do this. How about storing an id in the session and storing the cart in the database ? Then you could modify the cart with SQL, for a start.
KhandelwalA wrote: Dim txt As Integer = CType(DataList1.Items(i).FindControl("txtQty"), TextBox).Text
KhandelwalA wrote: Dim val As Integer = Convert.ToInt32(txt)
What are you writing this for ? Is it actually going to be used for anything ? By whom ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
Need a regular expression for Password Policy Validation...
The Password Policy should allow the contents mentioned below.
1. Password should be minimum of 9 characters in length
2. It should contain four characters [choose from a-z, A-Z]
3. It should contain four digits [choose from 0-9]
4. It should contain exactly one special character
[choose from #, @, $, !, underscore( _ ), hyphen (-), dot(.)]
Examples of correct passwords:
wxyz$6789 or a1b2#c3d4
Please help and Suggestions are welcomed.
Thanks in advance.
|
|
|
|
|
suravi wrote: Suggestions are welcomed.
Download Expresso, or buy a book on regular expressions.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
|
hi,
I need to implement search query in asp web form using c-sharp. I have taken a textbox control "txtSearch" and want to have search query through Google search engine.
|
|
|
|
|
|
no..its not like that i wanted
in web form , i've taken one textbox "txtSearch" and one button "btnSearch"..
When anyone searches some text by writing text to be searched in the txtSearch , then by clicking on the btnSearch ,it must automatically directs to google search.
|
|
|
|