|
I m using SQldatasource control to get the database table.. so would require a code accordingly
|
|
|
|
|
|
Dear All,
I have a query in SQL 2005 which takes some time to complete during query executation I want to show the progress for the user in asp.net application.
I can show Progress bar and I can run the progress of query in the background using thread but the problem exists how can i show the progress based on the query execuation?
any ideas? "I think the better approach would be to show seperate dialogbox (Window) from javascript and show the progress at that window."
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi Abdul
how long is "takes some time" a sec, a 30 sec ?
if its a 5 sec max ill go for an animated gif file here
if not i wont let the user to wait to much for a process
do you have to wait for the query to execute ?
MyDevBank.com
|
|
|
|
|
Thanks for reply, well the progress is different its based on column selection, the much the colums the much time it takes.It takes less and more than 30 sec in some circumstances.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
The challenge of a progress bar as you noted, server-or client-side, is difficulty of what to base the increment on during the query. Building on the suggestion of the first reply, how an animated gif image that symbolizes the query is running, combined with a counter that increments in seconds as the process running. Also, a message that warns searches could take from X - Y seconds, just so they don't think it's locked up. Those three elements might make the wait more bearable for the user.
Regards,
Gary
|
|
|
|
|
Thanks for the reply, but at least there should be something which i should show for the user, maybe i should an animated GIF till recieving the result from backend server.
any ideas for animated GIF?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
hi Im having 2 repeater controls each of 3 text boxes created dynamiaclly... and a button to submit values of text boxs in both repeaters to db.
keeping the 1st textbox value empty and if other two textboxs are filled and submitted it should show some error message.. this is same for both repeaters how can i do that....
|
|
|
|
|
textbox1 | textbox2 | textbox3 | button
in a simple flow:
when button click (
valid = true
validate textbox1
validate textbox2
validate textbox3
if(valid) insert else message("one of ......")
}
MyDevBank.com
|
|
|
|
|
MyDevBank wrote:
in a simple flow: ???
Both the repeater values to be inserted in single button click and it should be checked for each row of 2 repeaters this is my requirement.... this will not work by your explanation...
|
|
|
|
|
so i didnt got the right view of the UI you are describing
can you describe it better ?
MyDevBank.com
|
|
|
|
|
2 repeaters in page each repeater with 3 textboxs created dynamically and link button(Add more) to add inside repeater to add textboxs dynamically at the end of page submit button to insert the values to db.
suppose i click on addmore button to add three rows of textboxs and values enterd into it and finally when i click on submit button then it should check the condition for each of rows in repeater if its is true then page redirected to other else error message should display... this is same for both repeaters...
|
|
|
|
|
Hi,
I am new to RDLC, I have mapped my Dataset to RDLC. My RDLC Control have one table where I mapped all my columns of passing Dataset.
How the paging is coming based on my records, Can I change the page size (ie. show only 10 rows per page).
Thanks,
Rams.
Be simple and Be sample.
|
|
|
|
|
Hi,
I have designed one page with RDLC Control with table having links, onclick it will open the new page (using Jumpt to URL).
It opens new window fine for 1st page, when I move to 2 page using page navigator and click any link, then the link opens new page within the RDLC table area.
How to solve this?
Thanks in Advance,
Rams.
Be simple and Be sample.
|
|
|
|
|
hello guys,
i have an Access db. im uploading an image to my gallery table.
anyway. i need to insert some text in the field before adding the filename string
i need it to look this way at the db
Axxx.jpg
Azzz.jpg
Abbb.jpg
so i used the following code:
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string imagefolder = "photo";
string savepath;
string savefile;
Label3.Text = "A";
if (FileUpload1.HasFile)
{
savepath = Path.Combine(Request.PhysicalApplicationPath, imagefolder);
savefile = Path.Combine(savepath, FileUpload1.FileName);
FileUpload1.PostedFile.SaveAs(Server.MapPath(("" + this.Label3.Text +"" + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName))));
AccessDataSource1.Insert();
}
}
but i still keep getting in the db only the file's name without the text i want to add before it.
any ideas?
thank you.
|
|
|
|
|
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string imagefolder = "photo";
string savepath;
string savefile;
Label3.Text = "prefix";
if (FileUpload1.HasFile)
{
string entryName = Label3.Text +
System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
savepath = Path.Combine(Request.PhysicalApplicationPath, imagefolder);
savefile = Path.Combine(savepath, FileUpload1.FileName);
FileUpload1.PostedFile.SaveAs(Server.MapPath(entryName));
AccessDataSource1.Insert();
}
} Can you put a breakpoint on the highlighted line and inspect the variable entryName and post it's value?
I are Troll
|
|
|
|
|
Hi Eddy thanks for ur replay
Maybe i should get me a NON-Express edition of visual studio
unfortunatly im using the express edition where i cant do that. if u think there is a way after all i'd love to know
thanks for ur help brother !
|
|
|
|
|
here i figured it out sorry!
anyway
the enteryname is
"prefixidd9e1uDBJ-preview.jpg"
as it should be, but at the database, its only the jpg name without the prefix
|
|
|
|
|
What's the SQL of the AccessDataSource1.InsertCommand ? Does it get the correct parameters?
I are Troll
|
|
|
|
|
<InsertParameters>
<asp:controlParameter Name="file" Type="String" ControlID="FileUpload1" PropertyName="FileName"/>
<asp:controlParameter Name="about" Type="String" ControlID="txtBoxAbout" PropertyName="text" />
</InsertParameters>
|
|
|
|
|
You got it working you said?
The "Accessdatasource1"-control should have a property called "InsertCommand". That property holds an INSERT statement, in Sql-syntax.
Since you said that the variables contain the correct value, I'm guessing that it must go wrong when writing to the database. That's the task of the Accessdatasource, hence we'd want to check that next
I are Troll
|
|
|
|
|
this is my insercommand
InsertCommand="INSERT INTO [gallery] ([file], [about]) VALUES (?, ?)"
and my insertparameters
<InsertParameters>
<asp:controlParameter Name="file" Type="String" ControlID="FileUpload1" PropertyName="FileName"/>
<asp:controlParameter Name="about" Type="String" ControlID="txtBoxAbout" PropertyName="text" />
</InsertParameters>
what do u think i should do or add?
thanks
|
|
|
|
|
|
How about pointing the parameter to that label?
<asp:controlParameter Name="about" Type="String" ControlID="txtBoxAbout" PropertyName="text" />
Now, when you click the button, update the label first;
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string imagefolder = "photo";
string savepath;
string savefile;
Label3.Text = "Bla" + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName); Does that fix it?
I are Troll
|
|
|
|